Record Class RecordSerdeShape
java.lang.Object
java.lang.Record
io.micronaut.serde.processor.sourcegen.records.RecordSerdeShape
- Record Components:
canonicalConstructor- The canonical constructor used for instantiation.components- The ordered record components.
public record RecordSerdeShape(io.micronaut.inject.ast.MethodElement canonicalConstructor, List<RecordSerdeShape.RecordComponent> components)
extends Record
Shape model for record-based source generation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRecord component metadata used by source generation. -
Constructor Summary
ConstructorsConstructorDescriptionRecordSerdeShape(io.micronaut.inject.ast.MethodElement canonicalConstructor, List<RecordSerdeShape.RecordComponent> components) Creates an instance of aRecordSerdeShaperecord class. -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.inject.ast.MethodElementReturns the value of thecanonicalConstructorrecord component.Returns the value of thecomponentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RecordSerdeShape
public RecordSerdeShape(io.micronaut.inject.ast.MethodElement canonicalConstructor, List<RecordSerdeShape.RecordComponent> components) Creates an instance of aRecordSerdeShaperecord class.- Parameters:
canonicalConstructor- the value for thecanonicalConstructorrecord componentcomponents- the value for thecomponentsrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
canonicalConstructor
public io.micronaut.inject.ast.MethodElement canonicalConstructor()Returns the value of thecanonicalConstructorrecord component.- Returns:
- the value of the
canonicalConstructorrecord component
-
components
Returns the value of thecomponentsrecord component.- Returns:
- the value of the
componentsrecord component
-