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.nullable- Whether the property is nullable.readMethod- Bean getter method.writeMethod- Bean setter method.
- Enclosing class:
BeanSerdeShape
public static record BeanSerdeShape.BeanProperty(String name, io.micronaut.inject.ast.ClassElement serializationType, io.micronaut.inject.ast.ClassElement deserializationType, boolean nullable, io.micronaut.inject.ast.MethodElement readMethod, io.micronaut.inject.ast.MethodElement writeMethod)
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 nullable, io.micronaut.inject.ast.MethodElement readMethod, io.micronaut.inject.ast.MethodElement writeMethod) 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.booleannullable()Returns the value of thenullablerecord component.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.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 nullable, io.micronaut.inject.ast.MethodElement readMethod, io.micronaut.inject.ast.MethodElement writeMethod) Creates an instance of aBeanPropertyrecord class.- Parameters:
name- the value for thenamerecord componentserializationType- the value for theserializationTyperecord componentdeserializationType- the value for thedeserializationTyperecord componentnullable- the value for thenullablerecord componentreadMethod- the value for thereadMethodrecord componentwriteMethod- the value for thewriteMethodrecord 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
-
nullable
-
readMethod
public io.micronaut.inject.ast.MethodElement readMethod()Returns the value of thereadMethodrecord component.- Returns:
- the value of the
readMethodrecord component
-
writeMethod
public io.micronaut.inject.ast.MethodElement writeMethod()Returns the value of thewriteMethodrecord component.- Returns:
- the value of the
writeMethodrecord component
-