Record Class ToIr.Result

java.lang.Object
java.lang.Record
org.clafer.frontend.ToIr.Result
Record Components:
model - the explicit IR, or an empty model if the model has errors before this pass
diagnostics - the errors of the files, the parser, the checks, the symbols and this pass; an error without a position is at 1:1
errors - the errors without a position, as the compiler gives them: of reading the files, and of the checks of the whole model (ModelChecks), e.g., clafers named after keywords
scopes - the scopes of the explicit model's scope file, if it has no errors
files - the files of the model, whose lines the diagnostics are in
names - what the names refer to, for the language server, or Names.None if the model has errors before the resolver
Enclosing class:
ToIr

public static record ToIr.Result(Ir.Model model, List<Diagnostic> diagnostics, List<String> errors, Optional<Scopes> scopes, ModelFiles files, Names names) extends Record
  • Constructor Details

  • Method Details

    • messages

      public List<String> messages()
      Returns:
      the errors without a position if there are any, else the diagnostics, each at its position in its file
    • 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.
    • model

      public Ir.Model model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component
    • diagnostics

      Returns the value of the diagnostics record component.
      Returns:
      the value of the diagnostics record component
    • errors

      public List<String> errors()
      Returns the value of the errors record component.
      Returns:
      the value of the errors record component
    • scopes

      public Optional<Scopes> scopes()
      Returns the value of the scopes record component.
      Returns:
      the value of the scopes record component
    • files

      public ModelFiles files()
      Returns the value of the files record component.
      Returns:
      the value of the files record component
    • names

      public Names names()
      Returns the value of the names record component.
      Returns:
      the value of the names record component