com.io7m.smfj.parser.api

## Class SMFParseError

- java.lang.Object
- - com.io7m.smfj.parser.api.SMFParseError

- All Implemented Interfaces:
    SMFErrorType, SMFParseErrorType

      @Generated(value={"Immutables.generator","SMFParseErrorType"})
      public final class SMFParseError
      extends Object
      implements SMFParseErrorType

  The type of parse errors.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SMFParseError.Builder` Builds instances of type `SMFParseError`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SMFParseError.Builder` | `builder()` Creates a builder for `SMFParseError`.
    `static SMFParseError` | `copyOf(SMFParseErrorType instance)` Creates an immutable copy of a `SMFParseErrorType` value.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `SMFParseError` that have equal attribute values.
    `Optional<Exception>` | `exception()`
    `String` | `fullMessage()`
    `int` | `hashCode()` Computes a hash code from attributes: `lexical`, `message`, `exception`.
    `com.io7m.jlexing.core.LexicalPosition<URI>` | `lexical()`
    `String` | `message()`
    `static SMFParseError` | `of(com.io7m.jlexing.core.LexicalPosition<URI> lexical, String message, Optional<Exception> exception)` Construct a new immutable `SMFParseError` instance.
    `String` | `toString()` Prints the immutable value `SMFParseError` with attribute values.
    `SMFParseError` | `withException(Exception value)` Copy the current immutable object by setting a present value for the optional `exception` attribute.
    `SMFParseError` | `withException(Optional<? extends Exception> optional)` Copy the current immutable object by setting an optional value for the `exception` attribute.
    `SMFParseError` | `withLexical(com.io7m.jlexing.core.LexicalPosition<URI> value)` Copy the current immutable object by setting a value for the `lexical` attribute.
    `SMFParseError` | `withMessage(String value)` Copy the current immutable object by setting a value for the `message` attribute.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### lexical

          public com.io7m.jlexing.core.LexicalPosition<URI> lexical()

      Specified by:
        `lexical` in interface `SMFParseErrorType`
      Returns:
        Lexical information

    - #### message

          public String message()

      Specified by:
        `message` in interface `SMFErrorType`
      Specified by:
        `message` in interface `SMFParseErrorType`
      Returns:
        The value of the `message` attribute

    - #### exception

          public Optional<Exception> exception()

      Specified by:
        `exception` in interface `SMFErrorType`
      Specified by:
        `exception` in interface `SMFParseErrorType`
      Returns:
        The value of the `exception` attribute

    - #### withLexical

          public final SMFParseError withLexical(com.io7m.jlexing.core.LexicalPosition<URI> value)

      Copy the current immutable object by setting a value for the `lexical` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
      Parameters:
        `value` - A new value for lexical
      Returns:
        A modified copy of the `this` object

    - #### withMessage

          public final SMFParseError withMessage(String value)

      Copy the current immutable object by setting a value for the `message` attribute. An equals check used to prevent copying of the same value by returning `this`.
      Parameters:
        `value` - A new value for message
      Returns:
        A modified copy of the `this` object

    - #### withException

          public final SMFParseError withException(Exception value)

      Copy the current immutable object by setting a present value for the optional `exception` attribute.
      Parameters:
        `value` - The value for exception
      Returns:
        A modified copy of `this` object

    - #### withException

          public final SMFParseError withException(Optional<? extends Exception> optional)

      Copy the current immutable object by setting an optional value for the `exception` attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning `this`.
      Parameters:
        `optional` - A value for exception
      Returns:
        A modified copy of `this` object

    - #### equals

          public boolean equals(Object another)

      This instance is equal to all instances of `SMFParseError` that have equal attribute values.
      Overrides:
        `equals` in class `Object`
      Returns:
        `true` if `this` is equal to `another` instance

    - #### hashCode

          public int hashCode()

      Computes a hash code from attributes: `lexical`, `message`, `exception`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

      Prints the immutable value `SMFParseError` with attribute values.
      Overrides:
        `toString` in class `Object`
      Returns:
        A string representation of the value

    - #### fullMessage

          public String fullMessage()

      Returns a lazily initialized value of the `fullMessage` attribute. Initialized once and only once and stored for subsequent access with proper synchronization.

      Specified by:
        `fullMessage` in interface `SMFErrorType`
      Specified by:
        `fullMessage` in interface `SMFParseErrorType`
      Returns:
        A lazily initialized value of the `l.name` attribute

    - #### of

          public static SMFParseError of(com.io7m.jlexing.core.LexicalPosition<URI> lexical,
                                         String message,
                                         Optional<Exception> exception)

      Construct a new immutable `SMFParseError` instance.
      Parameters:
        `lexical` - The value for the `lexical` attribute
        `message` - The value for the `message` attribute
        `exception` - The value for the `exception` attribute
      Returns:
        An immutable SMFParseError instance

    - #### copyOf

          public static SMFParseError copyOf(SMFParseErrorType instance)

      Creates an immutable copy of a `SMFParseErrorType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
        `instance` - The instance to copy
      Returns:
        A copied immutable SMFParseError instance

    - #### builder

          public static SMFParseError.Builder builder()

      Creates a builder for `SMFParseError`.
      Returns:
        A new SMFParseError builder

Copyright © 2017 <code@io7m.com> http://io7m.com