Class PropertyCustomization

java.lang.Object
org.eclipse.yasson.internal.model.customization.CustomizationBase
org.eclipse.yasson.internal.model.customization.PropertyCustomization
All Implemented Interfaces:
ComponentBoundCustomization, Customization

public class PropertyCustomization extends CustomizationBase
Customization for a property of a class.
  • Field Details

    • jsonReadName

      private final String jsonReadName
    • jsonWriteName

      private final String jsonWriteName
    • serializeNumberFormatter

      private final JsonbNumberFormatter serializeNumberFormatter
    • deserializeNumberFormatter

      private final JsonbNumberFormatter deserializeNumberFormatter
    • serializeDateFormatter

      private final JsonbDateFormatter serializeDateFormatter
    • deserializeDateFormatter

      private final JsonbDateFormatter deserializeDateFormatter
    • serializeAdapter

      private final AdapterBinding serializeAdapter
    • deserializeAdapter

      private final AdapterBinding deserializeAdapter
    • readTransient

      private final boolean readTransient
    • writeTransient

      private final boolean writeTransient
    • implementationClass

      private final Class<?> implementationClass
  • Constructor Details

    • PropertyCustomization

      private PropertyCustomization(PropertyCustomization.Builder builder)
      Copies properties from builder an creates immutable instance.
      Parameters:
      builder - not null
  • Method Details

    • builder

      public static PropertyCustomization.Builder builder()
    • getJsonReadName

      public String getJsonReadName()
      Name if specified for property setter with JsonbProperty.
      Returns:
      read name
    • getJsonWriteName

      public String getJsonWriteName()
      Name if specified for property getter with JsonbProperty.
      Returns:
      write name
    • getSerializeNumberFormatter

      public JsonbNumberFormatter 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 by Customization.getDeserializeNumberFormatter()
      Returns:
      number formatter
    • getDeserializeNumberFormatter

      public JsonbNumberFormatter 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 by Customization.getSerializeNumberFormatter()
      Returns:
      number formatter
    • getSerializeDateFormatter

      public JsonbDateFormatter 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 by Customization.getDeserializeDateFormatter(). If not set, defaulted to jakarta.json.bind.annotation .JsonbDateFormat.DEFAULT_FORMAT.
      Returns:
      date formatter
    • getDeserializeDateFormatter

      public JsonbDateFormatter 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 by Customization.getSerializeDateFormatter(). If not set, defaulted to jakarta.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 Class<?> getImplementationClass()
      Implementation class if property is interface type.
      Returns:
      class implementing property interface
    • getDeserializeAdapterBinding

      public AdapterBinding getDeserializeAdapterBinding()
      Specified by:
      getDeserializeAdapterBinding in interface ComponentBoundCustomization
      Overrides:
      getDeserializeAdapterBinding in class CustomizationBase
      Returns:
      Adapter wrapper class with resolved generic information.
    • getSerializeAdapterBinding

      public AdapterBinding getSerializeAdapterBinding()
      Specified by:
      getSerializeAdapterBinding in interface ComponentBoundCustomization
      Overrides:
      getSerializeAdapterBinding in class CustomizationBase
      Returns:
      Adapter wrapper class with resolved generic information.