Record Class Syntax.EnumDecl
java.lang.Object
java.lang.Record
org.clafer.frontend.Syntax.EnumDecl
- Record Components:
span- where it isname- the name of the enumerationliterals- its literals
- All Implemented Interfaces:
Syntax.Declaration, Syntax.Node
- Enclosing class:
Syntax
public static record Syntax.EnumDecl(SourceSpan span, Syntax.Ident name, List<Syntax.Ident> literals)
extends Record
implements Syntax.Declaration
An enumeration,
enum E = a | b.-
Constructor Summary
ConstructorsConstructorDescriptionEnumDecl(SourceSpan span, Syntax.Ident name, List<Syntax.Ident> literals) Creates an instance of aEnumDeclrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.literals()Returns the value of theliteralsrecord component.name()Returns the value of thenamerecord component.span()Returns the value of thespanrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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
-
name
-
literals
-