Record Class CompilerError

java.lang.Object
java.lang.Record
org.dellroad.javabox.CompilerError
Record Components:
lineCol - the location where the error occurred (one based)
errorMessage - the error message

public record CompilerError(LineAndColumn lineCol, String errorMessage) extends Record
Captures a compilation error.
  • Constructor Details

    • CompilerError

      public CompilerError(LineAndColumn lineCol, String errorMessage)
      Creates an instance of a CompilerError record class.
      Parameters:
      lineCol - the value for the lineCol record component
      errorMessage - the value for the errorMessage record component
  • Method Details

    • toString

      public String toString()
      Format this instance like "12:34: continue outside of loop".
      Specified by:
      toString in class Record
    • 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.
    • lineCol

      public LineAndColumn lineCol()
      Returns the value of the lineCol record component.
      Returns:
      the value of the lineCol record component
    • errorMessage

      public String errorMessage()
      Returns the value of the errorMessage record component.
      Returns:
      the value of the errorMessage record component