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)
Constructor for BeanPropertySerializer.
|
| Modifier and Type | Method and Description |
|---|---|
protected JsonSerializerParameters |
getParameters()
Getter for the field
parameters. |
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 final String propertyName
protected JsonSerializerParameters getParameters()
Getter for the field parameters.
JsonSerializerParameters object.protected JsonSerializerParameters newParameters()
newParameters
JsonSerializerParameters object.public 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 © 2019. All rights reserved.