public abstract class BeanPropertySerializer<T,V> extends HasSerializer<V,JsonSerializer<V>>
| Modifier and Type | Field and Description |
|---|---|
protected String |
propertyName |
| Modifier | Constructor and Description |
|---|---|
protected |
BeanPropertySerializer(String propertyName) |
| Modifier and Type | Method and Description |
|---|---|
protected JsonSerializerParameters |
getParameters() |
String |
getPropertyName() |
abstract V |
getValue(T bean,
JsonSerializationContext ctx) |
protected JsonSerializerParameters |
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 final String propertyName
protected BeanPropertySerializer(String propertyName)
protected JsonSerializerParameters getParameters()
protected JsonSerializerParameters newParameters()
public String getPropertyName()
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)
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 © 2016. All Rights Reserved.