java.lang.Object
java.lang.Record
io.helidon.codegen.ClassCode
- Record Components:
newType
- the type that is to be createdclassModel
- class codemainTrigger
- main type responsible for this code generationoriginatingElements
- to map to source types that triggered this code generation
public record ClassCode(TypeName newType, ClassModel.Builder classModel, TypeName mainTrigger, Object[] originatingElements)
extends Record
A code generated type.
-
Constructor Summary
ConstructorDescriptionClassCode
(TypeName newType, ClassModel.Builder classModel, TypeName mainTrigger, Object... originatingElements) Creates an instance of aClassCode
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclassModel
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.Returns the value of themainTrigger
record component.newType()
Returns the value of thenewType
record component.Object[]
Returns the value of theoriginatingElements
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ClassCode
public ClassCode(TypeName newType, ClassModel.Builder classModel, TypeName mainTrigger, Object... originatingElements) Creates an instance of aClassCode
record class.- Parameters:
newType
- the value for thenewType
record componentclassModel
- the value for theclassModel
record componentmainTrigger
- the value for themainTrigger
record componentoriginatingElements
- the value for theoriginatingElements
record component
-
-
Method Details
-
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)
. -
newType
Returns the value of thenewType
record component.- Returns:
- the value of the
newType
record component
-
classModel
Returns the value of theclassModel
record component.- Returns:
- the value of the
classModel
record component
-
mainTrigger
Returns the value of themainTrigger
record component.- Returns:
- the value of the
mainTrigger
record component
-
originatingElements
Returns the value of theoriginatingElements
record component.- Returns:
- the value of the
originatingElements
record component
-