Package io.micronaut.sourcegen.model
Record Class EnumDef.EnumConstantDef
java.lang.Object
java.lang.Record
io.micronaut.sourcegen.model.EnumDef.EnumConstantDef
- Record Components:
name
- The enum constant nameconstructorArgs
- The arguments passed to the enum constructorjavadoc
- The documentation
- Enclosing class:
- EnumDef
public static record EnumDef.EnumConstantDef(String name, List<ExpressionDef> constructorArgs, List<String> javadoc)
extends Record
A type defining an enum constant.
- Since:
- 1.7
-
Constructor Summary
ConstructorsConstructorDescriptionEnumConstantDef
(String name, List<ExpressionDef> constructorArgs, List<String> javadoc) Creates an instance of aEnumConstantDef
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconstructorArgs
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.javadoc()
Returns the value of thejavadoc
record component.name()
Returns the value of thename
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
EnumConstantDef
Creates an instance of aEnumConstantDef
record class.- Parameters:
name
- the value for thename
record componentconstructorArgs
- the value for theconstructorArgs
record componentjavadoc
- the value for thejavadoc
record component
-
-
Method Details
-
builder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
constructorArgs
Returns the value of theconstructorArgs
record component.- Returns:
- the value of the
constructorArgs
record component
-
javadoc
Returns the value of thejavadoc
record component.- Returns:
- the value of the
javadoc
record component
-