Skip to content

Record Class IrisError.SpecError

Javadoc 27 generates this reference during each site build from the exported packages and the annotation processor. The Java guide shows the API in use.

java.lang.Object
java.lang.Record
dev.gecode.iris.IrisError.SpecError
Record Components:
code - the stable code of the error
message - the main diagnostic text
location - the location in the reader spec
All Implemented Interfaces:
IrisError, Serializable
Enclosing interface:
IrisError
public static record IrisError.SpecError(ErrorCode code, String message, Location location) extends Record implements IrisError
An error found while parsing a reader spec.
  • Constructor Details

    • SpecError

      public SpecError(ErrorCode code, String message, Location location)
      Creates an instance of a SpecError record class.
      Parameters:
      code - the value for the code record component
      message - the value for the message record component
      location - the value for the location record component
  • Method Details

    • inputLocation

      public @Nullable Location inputLocation()
      Description copied from interface: IrisError
      Returns the location in the input, or null if the error has none.
      Specified by:
      inputLocation in interface IrisError
      Returns:
      the location in the input, or null if the error has none
    • specLocation

      public Location specLocation()
      Description copied from interface: IrisError
      Returns the location in the reader spec, or null if the error has none.
      Specified by:
      specLocation in interface IrisError
      Returns:
      the location in the reader spec, or null if the error has none
    • context

      public @Nullable String context()
      Description copied from interface: IrisError
      Returns the execution context, outermost first, or null if the error has none.
      Specified by:
      context in interface IrisError
      Returns:
      the execution context, outermost first, or null if the error has none
    • recordPath

      public @Nullable List<Integer> recordPath()
      Description copied from interface: IrisError
      Returns the indices of a failed check's witness, or null for any other error.
      Specified by:
      recordPath in interface IrisError
      Returns:
      the indices of a failed check's witness, or null for any other error
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • code

      public ErrorCode code()
      Returns the value of the code record component.
      Specified by:
      code in interface IrisError
      Returns:
      the value of the code record component
    • message

      public String message()
      Returns the value of the message record component.
      Specified by:
      message in interface IrisError
      Returns:
      the value of the message record component
    • location

      public Location location()
      Returns the value of the location record component.
      Returns:
      the value of the location record component