Record Class Syntax.Clafer
java.lang.Object
java.lang.Record
org.clafer.frontend.Syntax.Clafer
- Record Components:
span- where it isisAbstract- whether it is writtenabstractmodifiers- its temporal modifiersgroupCard- its group cardinality, if writtenname- its namesuperClafer- its super clafer, if writtenreference- its reference, if writtencard- its cardinality, if writteninit- its initializer, if writtentransition- its transition, if writtenelements- its elements, if written, in braces or indented
- All Implemented Interfaces:
Syntax.Declaration, Syntax.Element, Syntax.Node
- Enclosing class:
Syntax
public static record Syntax.Clafer(SourceSpan span, boolean isAbstract, List<Syntax.TempModifier> modifiers, Optional<Syntax.GCard> groupCard, Syntax.Ident name, Optional<Syntax.Super> superClafer, Optional<Syntax.Reference> reference, Optional<Syntax.Card> card, Optional<Syntax.Init> init, Optional<Syntax.ClaferTransition> transition, Optional<Syntax.Elements> elements)
extends Record
implements Syntax.Element
A clafer, e.g.,
abstract xor A : B -> int ? = 3 { ... }.-
Constructor Summary
ConstructorsConstructorDescriptionClafer(SourceSpan span, boolean isAbstract, List<Syntax.TempModifier> modifiers, Optional<Syntax.GCard> groupCard, Syntax.Ident name, Optional<Syntax.Super> superClafer, Optional<Syntax.Reference> reference, Optional<Syntax.Card> card, Optional<Syntax.Init> init, Optional<Syntax.ClaferTransition> transition, Optional<Syntax.Elements> elements) Creates an instance of aClaferrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncard()Returns the value of thecardrecord component.elements()Returns the value of theelementsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegroupCardrecord component.final inthashCode()Returns a hash code value for this object.init()Returns the value of theinitrecord component.booleanReturns the value of theisAbstractrecord component.Returns the value of themodifiersrecord component.name()Returns the value of thenamerecord component.Returns the value of thereferencerecord component.span()Returns the value of thespanrecord component.Returns the value of thesuperClaferrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransitionrecord component.
-
Constructor Details
-
Clafer
public Clafer(SourceSpan span, boolean isAbstract, List<Syntax.TempModifier> modifiers, Optional<Syntax.GCard> groupCard, Syntax.Ident name, Optional<Syntax.Super> superClafer, Optional<Syntax.Reference> reference, Optional<Syntax.Card> card, Optional<Syntax.Init> init, Optional<Syntax.ClaferTransition> transition, Optional<Syntax.Elements> elements) Creates an instance of aClaferrecord class.- Parameters:
span- the value for thespanrecord componentisAbstract- the value for theisAbstractrecord componentmodifiers- the value for themodifiersrecord componentgroupCard- the value for thegroupCardrecord componentname- the value for thenamerecord componentsuperClafer- the value for thesuperClaferrecord componentreference- the value for thereferencerecord componentcard- the value for thecardrecord componentinit- the value for theinitrecord componenttransition- the value for thetransitionrecord componentelements- the value for theelementsrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
span
Returns the value of thespanrecord component.- Specified by:
spanin interfaceSyntax.Node- Returns:
- the value of the
spanrecord component
-
isAbstract
Returns the value of theisAbstractrecord component.- Returns:
- the value of the
isAbstractrecord component
-
modifiers
-
groupCard
-
name
-
superClafer
Returns the value of thesuperClaferrecord component.- Returns:
- the value of the
superClaferrecord component
-
reference
-
card
-
init
-
transition
Returns the value of thetransitionrecord component.- Returns:
- the value of the
transitionrecord component
-
elements
-