Record Class DiagnosticSnapshot.ModelInfo

java.lang.Object
java.lang.Record
ca.mcscert.jpipe.compiler.model.DiagnosticSnapshot.ModelInfo
Record Components:
name - the model's name.
kind - DiagnosticSnapshot.KIND_JUSTIFICATION or DiagnosticSnapshot.KIND_TEMPLATE.
implementedTemplate - name of the template this model implements, or null.
location - where the model is declared.
counts - how many elements of each type the model holds.
usedBy - models implementing this one; always empty for a justification.
symbols - the model's elements, in stable display order.
aliases - element ids rewritten during composition.
Enclosing class:
DiagnosticSnapshot

public static record DiagnosticSnapshot.ModelInfo(String name, String kind, String implementedTemplate, SourceLocation location, DiagnosticSnapshot.ElementCounts counts, List<DiagnosticSnapshot.ImplementorInfo> usedBy, List<DiagnosticSnapshot.SymbolInfo> symbols, List<DiagnosticSnapshot.AliasInfo> aliases) extends Record
A single model: its identity, its element census, and its symbols.
  • Constructor Details

  • Method Details

    • implementsTemplate

      public boolean implementsTemplate()
      True if this model implements a template.
    • isTemplate

      public boolean isTemplate()
      True if this model is a template rather than a justification.
    • 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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • kind

      public String kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • implementedTemplate

      public String implementedTemplate()
      Returns the value of the implementedTemplate record component.
      Returns:
      the value of the implementedTemplate record component
    • location

      public SourceLocation location()
      Returns the value of the location record component.
      Returns:
      the value of the location record component
    • counts

      Returns the value of the counts record component.
      Returns:
      the value of the counts record component
    • usedBy

      Returns the value of the usedBy record component.
      Returns:
      the value of the usedBy record component
    • symbols

      Returns the value of the symbols record component.
      Returns:
      the value of the symbols record component
    • aliases

      Returns the value of the aliases record component.
      Returns:
      the value of the aliases record component