Record Class Ir.ClaferDecl
java.lang.Object
java.lang.Record
org.clafer.frontend.Ir.ClaferDecl
- Record Components:
span- from its first token to its closing braceisAbstract- whether it is abstractmodifiers- its temporal modifiers, richgroupCard- its group card, as writtenname- its name, the compiler's UIDsuperName- its super claferref- its own referencecard- its multiplicity as the core has it:0..*for a top-level abstract clafer, whose written bound is itsabstractMultiplicityabstractMultiplicity- the written bound of a top-level abstract clafer,abstract Tools 3..6, richinitializer- its initializer, richelements- its constraints and subclafers, in the order writtenorigin- the rich construct it was lowered from
- All Implemented Interfaces:
Ir.Element, Ir.Node
- Enclosing class:
Ir
public static record Ir.ClaferDecl(SourceSpan span, boolean isAbstract, List<Ir.Modifier> modifiers, Ir.Card groupCard, Ir.Name name, Optional<Ir.Name> superName, Optional<Ir.RefDecl> ref, Ir.Card card, Optional<Ir.AbstractMultiplicity> abstractMultiplicity, Optional<Ir.Initializer> initializer, List<Ir.Element> elements, Optional<Ir.Origin> origin)
extends Record
implements Ir.Element
A clafer:
[abstract] [modifiers] gcard name [: super] [-> | ->> target] card [initializer] { elements }.
The core parts are its fields; the rich ones are nodes of their own.-
Constructor Summary
ConstructorsConstructorDescriptionClaferDecl(SourceSpan span, boolean isAbstract, List<Ir.Modifier> modifiers, Ir.Card groupCard, Ir.Name name, Optional<Ir.Name> superName, Optional<Ir.RefDecl> ref, Ir.Card card, Optional<Ir.AbstractMultiplicity> abstractMultiplicity, Optional<Ir.Initializer> initializer, List<Ir.Element> elements, Optional<Ir.Origin> origin) Creates an instance of aClaferDeclrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theabstractMultiplicityrecord component.card()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.Returns the value of theinitializerrecord component.booleanReturns the value of theisAbstractrecord component.Returns the value of themodifiersrecord component.name()Returns the value of thenamerecord component.origin()Returns the value of theoriginrecord component.ref()Returns the value of therefrecord component.span()Returns the value of thespanrecord component.Returns the value of thesuperNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClaferDecl
public ClaferDecl(SourceSpan span, boolean isAbstract, List<Ir.Modifier> modifiers, Ir.Card groupCard, Ir.Name name, Optional<Ir.Name> superName, Optional<Ir.RefDecl> ref, Ir.Card card, Optional<Ir.AbstractMultiplicity> abstractMultiplicity, Optional<Ir.Initializer> initializer, List<Ir.Element> elements, Optional<Ir.Origin> origin) Creates an instance of aClaferDeclrecord 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 componentsuperName- the value for thesuperNamerecord componentref- the value for therefrecord componentcard- the value for thecardrecord componentabstractMultiplicity- the value for theabstractMultiplicityrecord componentinitializer- the value for theinitializerrecord componentelements- the value for theelementsrecord componentorigin- the value for theoriginrecord 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
-
isAbstract
Returns the value of theisAbstractrecord component.- Returns:
- the value of the
isAbstractrecord component
-
modifiers
-
groupCard
-
name
-
superName
-
ref
-
card
-
abstractMultiplicity
Returns the value of theabstractMultiplicityrecord component.- Returns:
- the value of the
abstractMultiplicityrecord component
-
initializer
Returns the value of theinitializerrecord component.- Returns:
- the value of the
initializerrecord component
-
elements
-
origin
-