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
ConstructorsConstructorDescriptionClassCode(TypeName newType, ClassModel.Builder classModel, TypeName mainTrigger, Object... originatingElements) Creates an instance of aClassCoderecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclassModelrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themainTriggerrecord component.newType()Returns the value of thenewTyperecord component.Object[]Returns the value of theoriginatingElementsrecord component.final StringtoString()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 aClassCoderecord class.- Parameters:
newType- the value for thenewTyperecord componentclassModel- the value for theclassModelrecord componentmainTrigger- the value for themainTriggerrecord componentoriginatingElements- the value for theoriginatingElementsrecord 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 thenewTyperecord component.- Returns:
- the value of the
newTyperecord component
-
classModel
Returns the value of theclassModelrecord component.- Returns:
- the value of the
classModelrecord component
-
mainTrigger
Returns the value of themainTriggerrecord component.- Returns:
- the value of the
mainTriggerrecord component
-
originatingElements
Returns the value of theoriginatingElementsrecord component.- Returns:
- the value of the
originatingElementsrecord component
-