Module org.eclipse.yasson
Class PropertyCustomization
java.lang.Object
org.eclipse.yasson.internal.model.customization.CustomizationBase
org.eclipse.yasson.internal.model.customization.PropertyCustomization
- All Implemented Interfaces:
ComponentBoundCustomization
,Customization
Customization for a property of a class.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AdapterBinding
private final JsonbDateFormatter
private final JsonbNumberFormatter
private final Class
<?> private final String
private final String
private final boolean
private final AdapterBinding
private final JsonbDateFormatter
private final JsonbNumberFormatter
private final boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Copies properties from builder an creates immutable instance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Date formatter for formatting date values during deserialization process.Number formatter for formatting numbers during deserialization process.Class
<?> Implementation class if property is interface type.Name if specified for property setter withJsonbProperty
.Name if specified for property getter withJsonbProperty
.Date formatter for formatting date values during serialization process.Number formatter for formatting numbers during serialization process.boolean
The flag indicating whether the value of the underlying type/property should be processed during serialization process or not.boolean
The flag indicating whether the value of the underlying type/property should be processed during deserialization process or not.Methods inherited from class org.eclipse.yasson.internal.model.customization.CustomizationBase
getDeserializerBinding, getSerializerBinding, isNillable
-
Field Details
-
jsonReadName
-
jsonWriteName
-
serializeNumberFormatter
-
deserializeNumberFormatter
-
serializeDateFormatter
-
deserializeDateFormatter
-
serializeAdapter
-
deserializeAdapter
-
readTransient
private final boolean readTransient -
writeTransient
private final boolean writeTransient -
implementationClass
-
-
Constructor Details
-
PropertyCustomization
Copies properties from builder an creates immutable instance.- Parameters:
builder
- not null
-
-
Method Details
-
builder
-
getJsonReadName
Name if specified for property setter withJsonbProperty
.- Returns:
- read name
-
getJsonWriteName
Name if specified for property getter withJsonbProperty
.- Returns:
- write name
-
getSerializeNumberFormatter
Description copied from interface:Customization
Number formatter for formatting numbers during serialization process. It could be the same formatter instance used for deserialization (returned byCustomization.getDeserializeNumberFormatter()
- Returns:
- number formatter
-
getDeserializeNumberFormatter
Description copied from interface:Customization
Number formatter for formatting numbers during deserialization process. It could be the same formatter instance used for serialization (returned byCustomization.getSerializeNumberFormatter()
- Returns:
- number formatter
-
getSerializeDateFormatter
Description copied from interface:Customization
Date 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 tojakarta.json.bind.annotation .JsonbDateFormat.DEFAULT_FORMAT.
- Returns:
- date formatter
-
getDeserializeDateFormatter
Description copied from interface:Customization
Date 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 tojakarta.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
Implementation class if property is interface type.- Returns:
- class implementing property interface
-
getDeserializeAdapterBinding
- Specified by:
getDeserializeAdapterBinding
in interfaceComponentBoundCustomization
- Overrides:
getDeserializeAdapterBinding
in classCustomizationBase
- Returns:
- Adapter wrapper class with resolved generic information.
-
getSerializeAdapterBinding
- Specified by:
getSerializeAdapterBinding
in interfaceComponentBoundCustomization
- Overrides:
getSerializeAdapterBinding
in classCustomizationBase
- Returns:
- Adapter wrapper class with resolved generic information.
-