public abstract class BeanPropertySerializer<T,V> extends HasSerializer<V,JsonSerializer<V>>
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
propertyName |
| Modifier | Constructor and Description |
|---|---|
protected |
BeanPropertySerializer(java.lang.String propertyName)
Constructor for BeanPropertySerializer.
|
| Modifier and Type | Method and Description |
|---|---|
protected JsonSerializerParameters |
getParameters()
Getter for the field
parameters. |
java.lang.String |
getPropertyName()
Getter for the field
propertyName. |
abstract V |
getValue(T bean,
JsonSerializationContext ctx)
getValue
|
protected JsonSerializerParameters |
newParameters()
newParameters
|
void |
serialize(JsonWriter writer,
T bean,
JsonSerializationContext ctx)
Serializes the property defined for this instance.
|
void |
serializePropertyName(JsonWriter writer,
T bean,
JsonSerializationContext ctx)
Serializes the property name
|
getSerializer, newSerializerprotected BeanPropertySerializer(java.lang.String propertyName)
Constructor for BeanPropertySerializer.
propertyName - a String object.protected JsonSerializerParameters getParameters()
Getter for the field parameters.
JsonSerializerParameters object.protected JsonSerializerParameters newParameters()
newParameters
JsonSerializerParameters object.public java.lang.String getPropertyName()
Getter for the field propertyName.
String object.public void serializePropertyName(JsonWriter writer, T bean, JsonSerializationContext ctx)
writer - writerbean - bean containing the property to serializectx - context of the serialization processpublic abstract V getValue(T bean, JsonSerializationContext ctx)
getValue
bean - bean containing the property to serializectx - context of the serialization processpublic void serialize(JsonWriter writer, T bean, JsonSerializationContext ctx)
writer - writerbean - bean containing the property to serializectx - context of the serialization processCopyright © 2018. All Rights Reserved.