Record Class RecordSerdeShape.RecordComponent
java.lang.Object
java.lang.Record
io.micronaut.serde.processor.sourcegen.records.RecordSerdeShape.RecordComponent
- Record Components:
name- The component name.serializedName- The serialized component name.type- The component type.keyMetadata- Pre-resolved metadata contributed with the component key.include- The inclusion resolved at build time, ornullwhen the configuration decides.required- Whether the component has to be present in the input.aliases- Additional names the component is read from.nonNull- Whether the component rejects null, declared on the parameter or the property.nullable- Whether the component accepts null, declared on the parameter or the property.propertyElement- The associated bean property element.
- Enclosing class:
RecordSerdeShape
public static record RecordSerdeShape.RecordComponent(String name, String serializedName, io.micronaut.inject.ast.ClassElement type, Map<String,String> keyMetadata, @Nullable SerdeConfig.SerInclude include, boolean required, List<String> aliases, boolean nonNull, boolean nullable, io.micronaut.inject.ast.PropertyElement propertyElement)
extends Record
Record component metadata used by source generation.
-
Constructor Summary
ConstructorsConstructorDescriptionRecordComponent(String name, io.micronaut.inject.ast.ClassElement type, io.micronaut.inject.ast.PropertyElement propertyElement) Creates a component whose serialized name matches its Java name and has no key metadata.RecordComponent(String name, String serializedName, io.micronaut.inject.ast.ClassElement type, Map<String, String> keyMetadata, @Nullable SerdeConfig.SerInclude include, boolean required, List<String> aliases, boolean nonNull, boolean nullable, io.micronaut.inject.ast.PropertyElement propertyElement) Creates an instance of aRecordComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaliases()Returns the value of thealiasesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable SerdeConfig.SerIncludeinclude()Returns the value of theincluderecord component.Returns the value of thekeyMetadatarecord component.name()Returns the value of thenamerecord component.booleannonNull()Returns the value of thenonNullrecord component.booleannullable()Returns the value of thenullablerecord component.io.micronaut.inject.ast.PropertyElementReturns the value of thepropertyElementrecord component.booleanrequired()Returns the value of therequiredrecord component.Returns the value of theserializedNamerecord component.final StringtoString()Returns a string representation of this record class.io.micronaut.inject.ast.ClassElementtype()Returns the value of thetyperecord component.
-
Constructor Details
-
RecordComponent
public RecordComponent(String name, io.micronaut.inject.ast.ClassElement type, io.micronaut.inject.ast.PropertyElement propertyElement) Creates a component whose serialized name matches its Java name and has no key metadata.- Parameters:
name- The component name.type- The component type.propertyElement- The associated bean property element.
-
RecordComponent
public RecordComponent(String name, String serializedName, io.micronaut.inject.ast.ClassElement type, Map<String, String> keyMetadata, @Nullable SerdeConfig.SerInclude include, boolean required, List<String> aliases, boolean nonNull, boolean nullable, io.micronaut.inject.ast.PropertyElement propertyElement) Creates an instance of aRecordComponentrecord class.- Parameters:
name- the value for thenamerecord componentserializedName- the value for theserializedNamerecord componenttype- the value for thetyperecord componentkeyMetadata- the value for thekeyMetadatarecord componentinclude- the value for theincluderecord componentrequired- the value for therequiredrecord componentaliases- the value for thealiasesrecord componentnonNull- the value for thenonNullrecord componentnullable- the value for thenullablerecord componentpropertyElement- the value for thepropertyElementrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
name
-
serializedName
Returns the value of theserializedNamerecord component.- Returns:
- the value of the
serializedNamerecord component
-
type
-
keyMetadata
Returns the value of thekeyMetadatarecord component.- Returns:
- the value of the
keyMetadatarecord component
-
include
-
required
-
aliases
-
nonNull
-
nullable
-
propertyElement
public io.micronaut.inject.ast.PropertyElement propertyElement()Returns the value of thepropertyElementrecord component.- Returns:
- the value of the
propertyElementrecord component
-