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_JUSTIFICATIONorDiagnosticSnapshot.KIND_TEMPLATE.implementedTemplate- name of the template this model implements, ornull.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 Summary
ConstructorsConstructorDescriptionModelInfo(String name, String kind, String implementedTemplate, SourceLocation location, DiagnosticSnapshot.ElementCounts counts, List<DiagnosticSnapshot.ImplementorInfo> usedBy, List<DiagnosticSnapshot.SymbolInfo> symbols, List<DiagnosticSnapshot.AliasInfo> aliases) Copies every collection on the way in, as the enclosing record does. -
Method Summary
Modifier and TypeMethodDescriptionaliases()Returns the value of thealiasesrecord component.counts()Returns the value of thecountsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theimplementedTemplaterecord component.booleanTrue if this model implements a template.booleanTrue if this model is a template rather than a justification.kind()Returns the value of thekindrecord component.location()Returns the value of thelocationrecord component.name()Returns the value of thenamerecord component.symbols()Returns the value of thesymbolsrecord component.final StringtoString()Returns a string representation of this record class.usedBy()Returns the value of theusedByrecord component.
-
Constructor Details
-
ModelInfo
public ModelInfo(String name, String kind, String implementedTemplate, SourceLocation location, DiagnosticSnapshot.ElementCounts counts, List<DiagnosticSnapshot.ImplementorInfo> usedBy, List<DiagnosticSnapshot.SymbolInfo> symbols, List<DiagnosticSnapshot.AliasInfo> aliases) Copies every collection on the way in, as the enclosing record does.
-
-
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
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
name
-
kind
-
implementedTemplate
Returns the value of theimplementedTemplaterecord component.- Returns:
- the value of the
implementedTemplaterecord component
-
location
-
counts
-
usedBy
-
symbols
-
aliases
-