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 Summary
Fields Modifier and Type Field Description protected java.lang.StringpropertyName -
Constructor Summary
Constructors Modifier Constructor Description protectedBeanPropertySerializer(java.lang.String propertyName)Constructor for BeanPropertySerializer. -
Method Summary
Modifier and Type Method Description protected JsonSerializerParametersgetParameters()Getter for the fieldparameters.java.lang.StringgetPropertyName()Getter for the fieldpropertyName.abstract VgetValue(T bean, JsonSerializationContext ctx)getValueprotected JsonSerializerParametersnewParameters()newParametersvoidserialize(JsonWriter writer, T bean, JsonSerializationContext ctx)Serializes the property defined for this instance.voidserializePropertyName(JsonWriter writer, T bean, JsonSerializationContext ctx)Serializes the property nameMethods inherited from class org.dominokit.jacksonapt.ser.bean.HasSerializer
getSerializer, newSerializerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
propertyName
protected final java.lang.String propertyName
-
-
Constructor Details
-
BeanPropertySerializer
protected BeanPropertySerializer(java.lang.String propertyName)Constructor for BeanPropertySerializer.
- Parameters:
propertyName- aStringobject.
-
-
Method Details
-
getParameters
Getter for the field
parameters.- Returns:
- a
JsonSerializerParametersobject.
-
newParameters
newParameters
- Returns:
- a
JsonSerializerParametersobject.
-
getPropertyName
public java.lang.String getPropertyName()Getter for the field
propertyName.- Returns:
- a
Stringobject.
-
serializePropertyName
Serializes the property name- Parameters:
writer- writerbean- bean containing the property to serializectx- context of the serialization process
-
getValue
getValue
- Parameters:
bean- bean containing the property to serializectx- context of the serialization process- Returns:
- the property's value
-
serialize
Serializes the property defined for this instance.- Parameters:
writer- writerbean- bean containing the property to serializectx- context of the serialization process
-