Class PropertyCustomization
- java.lang.Object
-
- org.eclipse.yasson.internal.model.customization.PropertyCustomization
-
- All Implemented Interfaces:
ComponentBoundCustomization,Customization
public class PropertyCustomization extends java.lang.ObjectCustomization for a property of a class.
-
-
Constructor Summary
Constructors Constructor Description PropertyCustomization(PropertyCustomizationBuilder builder)Copies properties from builder an creates immutable instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdapterBindinggetDeserializeAdapterBinding()JsonbDateFormattergetDeserializeDateFormatter()Date formatter for formatting date values during deserialization process.JsonbNumberFormattergetDeserializeNumberFormatter()Number formatter for formatting numbers during deserialization process.DeserializerBindinggetDeserializerBinding()Deserializer wrapper with resolved generic info.java.lang.Class<?>getImplementationClass()Implementation class if property is interface type.java.lang.StringgetJsonReadName()Name if specified for property setter withJsonbProperty.java.lang.StringgetJsonWriteName()Name if specified for property getter withJsonbProperty.AdapterBindinggetSerializeAdapterBinding()JsonbDateFormattergetSerializeDateFormatter()Date formatter for formatting date values during serialization process.JsonbNumberFormattergetSerializeNumberFormatter()Number formatter for formatting numbers during serialization process.SerializerBindinggetSerializerBinding()Serializer wrapper with resolved generic info.booleanisNillable()Returns true if nillable customization is present.booleanisReadTransient()The flag indicating whether the value of the underlying type/property should be processed during serialization process or not.booleanisWriteTransient()The flag indicating whether the value of the underlying type/property should be processed during deserialization process or not.
-
-
-
Constructor Detail
-
PropertyCustomization
public PropertyCustomization(PropertyCustomizationBuilder builder)
Copies properties from builder an creates immutable instance.- Parameters:
builder- not null
-
-
Method Detail
-
getJsonReadName
public java.lang.String getJsonReadName()
Name if specified for property setter withJsonbProperty.- Returns:
- read name
-
getJsonWriteName
public java.lang.String getJsonWriteName()
Name if specified for property getter withJsonbProperty.- Returns:
- write name
-
getSerializeNumberFormatter
public JsonbNumberFormatter getSerializeNumberFormatter()
Description copied from interface:CustomizationNumber formatter for formatting numbers during serialization process. It could be the same formatter instance used for deserialization (returned byCustomization.getDeserializeNumberFormatter()- Returns:
- number formatter
-
getDeserializeNumberFormatter
public JsonbNumberFormatter getDeserializeNumberFormatter()
Description copied from interface:CustomizationNumber formatter for formatting numbers during deserialization process. It could be the same formatter instance used for serialization (returned byCustomization.getSerializeNumberFormatter()- Returns:
- number formatter
-
getSerializeDateFormatter
public JsonbDateFormatter getSerializeDateFormatter()
Description copied from interface:CustomizationDate formatter for formatting date values during serialization process. It could be the same formatter instance used for deserialization (returned byCustomization.getDeserializeDateFormatter(). If not set, defaulted tojavax.json.bind.annotation .JsonbDateFormat.DEFAULT_FORMAT.- Returns:
- date formatter
-
getDeserializeDateFormatter
public JsonbDateFormatter getDeserializeDateFormatter()
Description copied from interface:CustomizationDate formatter for formatting date values during deserialization process. It could be the same formatter instance used for serialization (returned byCustomization.getSerializeDateFormatter(). If not set, defaulted tojavax.json.bind.annotation .JsonbDateFormat.DEFAULT_FORMAT.- Returns:
- date formatter
-
isReadTransient
public boolean isReadTransient()
The flag indicating whether the value of the underlying type/property should be processed during serialization process or not.- Returns:
- true indicates that the underlying type/property should be included in serialization process and false indicates it should not
-
isWriteTransient
public boolean isWriteTransient()
The flag indicating whether the value of the underlying type/property should be processed during deserialization process or not.- Returns:
- true indicates that the underlying type/property should be included in deserialization process and false indicates it should not
-
getImplementationClass
public java.lang.Class<?> getImplementationClass()
Implementation class if property is interface type.- Returns:
- class implementing property interface
-
getDeserializeAdapterBinding
public AdapterBinding getDeserializeAdapterBinding()
- Specified by:
getDeserializeAdapterBindingin interfaceComponentBoundCustomization- Returns:
- Adapter wrapper class with resolved generic information.
-
getSerializeAdapterBinding
public AdapterBinding getSerializeAdapterBinding()
- Specified by:
getSerializeAdapterBindingin interfaceComponentBoundCustomization- Returns:
- Adapter wrapper class with resolved generic information.
-
isNillable
public boolean isNillable()
Returns true if nillable customization is present.- Specified by:
isNillablein interfaceCustomization- Returns:
- True if nillable customization is present.
-
getSerializerBinding
public SerializerBinding getSerializerBinding()
Serializer wrapper with resolved generic info.- Specified by:
getSerializerBindingin interfaceComponentBoundCustomization- Returns:
- serializer wrapper
-
getDeserializerBinding
public DeserializerBinding getDeserializerBinding()
Deserializer wrapper with resolved generic info.- Specified by:
getDeserializerBindingin interfaceComponentBoundCustomization- Returns:
- deserializer wrapper
-
-