Record Class BeanSerdeShape.BeanProperty
java.lang.Object
java.lang.Record
io.micronaut.serde.processor.sourcegen.beans.BeanSerdeShape.BeanProperty
- Record Components:
name- Property name.serializationType- Property type used for serialization.deserializationType- Property type used for deserialization.nonNull- Whether the property is non-null.nullable- Whether the property is nullable.readMethod- Bean getter method.writeMethod- Bean setter method.readField- Bean field used for reading.writeField- Bean field used for writing.
- Enclosing class:
BeanSerdeShape
public static record BeanSerdeShape.BeanProperty(String name, io.micronaut.inject.ast.ClassElement serializationType, io.micronaut.inject.ast.ClassElement deserializationType, boolean nonNull, boolean nullable, @Nullable io.micronaut.inject.ast.MethodElement readMethod, @Nullable io.micronaut.inject.ast.MethodElement writeMethod, @Nullable io.micronaut.inject.ast.FieldElement readField, @Nullable io.micronaut.inject.ast.FieldElement writeField)
extends Record
Bean property metadata used by source generation.
-
Constructor Summary
ConstructorsConstructorDescriptionBeanProperty(String name, io.micronaut.inject.ast.ClassElement serializationType, io.micronaut.inject.ast.ClassElement deserializationType, boolean nonNull, boolean nullable, @Nullable io.micronaut.inject.ast.MethodElement readMethod, @Nullable io.micronaut.inject.ast.MethodElement writeMethod, @Nullable io.micronaut.inject.ast.FieldElement readField, @Nullable io.micronaut.inject.ast.FieldElement writeField) Creates an instance of aBeanPropertyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionio.micronaut.inject.ast.ClassElementReturns the value of thedeserializationTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.booleannonNull()Returns the value of thenonNullrecord component.booleannullable()Returns the value of thenullablerecord component.@Nullable io.micronaut.inject.ast.FieldElementReturns the value of thereadFieldrecord component.@Nullable io.micronaut.inject.ast.MethodElementReturns the value of thereadMethodrecord component.io.micronaut.inject.ast.ClassElementReturns the value of theserializationTyperecord component.final StringtoString()Returns a string representation of this record class.@Nullable io.micronaut.inject.ast.FieldElementReturns the value of thewriteFieldrecord component.@Nullable io.micronaut.inject.ast.MethodElementReturns the value of thewriteMethodrecord component.
-
Constructor Details
-
BeanProperty
public BeanProperty(String name, io.micronaut.inject.ast.ClassElement serializationType, io.micronaut.inject.ast.ClassElement deserializationType, boolean nonNull, boolean nullable, @Nullable io.micronaut.inject.ast.MethodElement readMethod, @Nullable io.micronaut.inject.ast.MethodElement writeMethod, @Nullable io.micronaut.inject.ast.FieldElement readField, @Nullable io.micronaut.inject.ast.FieldElement writeField) Creates an instance of aBeanPropertyrecord class.- Parameters:
name- the value for thenamerecord componentserializationType- the value for theserializationTyperecord componentdeserializationType- the value for thedeserializationTyperecord componentnonNull- the value for thenonNullrecord componentnullable- the value for thenullablerecord componentreadMethod- the value for thereadMethodrecord componentwriteMethod- the value for thewriteMethodrecord componentreadField- the value for thereadFieldrecord componentwriteField- the value for thewriteFieldrecord 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
-
serializationType
public io.micronaut.inject.ast.ClassElement serializationType()Returns the value of theserializationTyperecord component.- Returns:
- the value of the
serializationTyperecord component
-
deserializationType
public io.micronaut.inject.ast.ClassElement deserializationType()Returns the value of thedeserializationTyperecord component.- Returns:
- the value of the
deserializationTyperecord component
-
nonNull
-
nullable
-
readMethod
public @Nullable io.micronaut.inject.ast.MethodElement readMethod()Returns the value of thereadMethodrecord component.- Returns:
- the value of the
readMethodrecord component
-
writeMethod
public @Nullable io.micronaut.inject.ast.MethodElement writeMethod()Returns the value of thewriteMethodrecord component.- Returns:
- the value of the
writeMethodrecord component
-
readField
-
writeField
public @Nullable io.micronaut.inject.ast.FieldElement writeField()Returns the value of thewriteFieldrecord component.- Returns:
- the value of the
writeFieldrecord component
-