Record Class Syntax.Model
java.lang.Object
java.lang.Record
org.clafer.frontend.Syntax.Model
- Record Components:
span- the whole sourcedeclarations- the enumerations and the top-level elements
- All Implemented Interfaces:
Syntax.Node
- Enclosing class:
Syntax
public static record Syntax.Model(SourceSpan span, List<Syntax.Declaration> declarations)
extends Record
implements Syntax.Node
A model: its declarations in the order they were written.
-
Constructor Summary
ConstructorsConstructorDescriptionModel(SourceSpan span, List<Syntax.Declaration> declarations) Creates an instance of aModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedeclarationsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.span()Returns the value of thespanrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Model
Creates an instance of aModelrecord class.- Parameters:
span- the value for thespanrecord componentdeclarations- the value for thedeclarationsrecord component
-
-
Method Details
-
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). -
span
Returns the value of thespanrecord component.- Specified by:
spanin interfaceSyntax.Node- Returns:
- the value of the
spanrecord component
-
declarations
Returns the value of thedeclarationsrecord component.- Returns:
- the value of the
declarationsrecord component
-