Class BeanPropertySerializer<T,​V>

java.lang.Object
org.dominokit.jacksonapt.ser.bean.HasSerializer<V,​JsonSerializer<V>>
org.dominokit.jacksonapt.ser.bean.BeanPropertySerializer<T,​V>
Direct Known Subclasses:
AnyGetterPropertySerializer, PropertyIdentitySerializationInfo

public abstract class BeanPropertySerializer<T,​V>
extends HasSerializer<V,​JsonSerializer<V>>
Serializes a bean's property
Version:
$Id: $
Author:
Nicolas Morel
  • Field Details

    • propertyName

      protected final java.lang.String propertyName
  • Constructor Details

    • BeanPropertySerializer

      protected BeanPropertySerializer​(java.lang.String propertyName)

      Constructor for BeanPropertySerializer.

      Parameters:
      propertyName - a String object.
  • Method Details

    • getParameters

      protected JsonSerializerParameters getParameters()

      Getter for the field parameters.

      Returns:
      a JsonSerializerParameters object.
    • newParameters

      protected JsonSerializerParameters newParameters()

      newParameters

      Returns:
      a JsonSerializerParameters object.
    • getPropertyName

      public java.lang.String getPropertyName()

      Getter for the field propertyName.

      Returns:
      a String object.
    • serializePropertyName

      public void serializePropertyName​(JsonWriter writer, T bean, JsonSerializationContext ctx)
      Serializes the property name
      Parameters:
      writer - writer
      bean - bean containing the property to serialize
      ctx - context of the serialization process
    • getValue

      public abstract V getValue​(T bean, JsonSerializationContext ctx)

      getValue

      Parameters:
      bean - bean containing the property to serialize
      ctx - context of the serialization process
      Returns:
      the property's value
    • serialize

      public void serialize​(JsonWriter writer, T bean, JsonSerializationContext ctx)
      Serializes the property defined for this instance.
      Parameters:
      writer - writer
      bean - bean containing the property to serialize
      ctx - context of the serialization process