org.codehaus.jackson.map.ser
Class BeanPropertyWriter.StdMethod
java.lang.Object
org.codehaus.jackson.map.ser.BeanPropertyWriter
org.codehaus.jackson.map.ser.BeanPropertyWriter.StdMethod
- Enclosing class:
- BeanPropertyWriter
public static final class BeanPropertyWriter.StdMethod
- extends BeanPropertyWriter
Basic property writer that outputs property entry independent
of what value property has.
_accessorMethod
protected final Method _accessorMethod
- Accessor method used to get property value
BeanPropertyWriter.StdMethod
public BeanPropertyWriter.StdMethod(String name,
JsonSerializer<Object> ser,
Class<?> serType,
Method acc)
withSerializer
public BeanPropertyWriter withSerializer(JsonSerializer<Object> ser)
- Description copied from class:
BeanPropertyWriter
- Method that will construct and return a new writer that has
same properties as this writer, but uses specified serializer
instead of currently configured one (if any).
- Specified by:
withSerializer in class BeanPropertyWriter
serializeAsField
public void serializeAsField(Object bean,
JsonGenerator jgen,
SerializerProvider prov)
throws Exception
- Description copied from class:
BeanPropertyWriter
- Method called to access property that this bean stands for, from
within given bean, and to serialize it as a Json Object field
using appropriate serializer.
- Specified by:
serializeAsField in class BeanPropertyWriter
- Throws:
Exception
getReturnType
public final Class<?> getReturnType()
- Specified by:
getReturnType in class BeanPropertyWriter
get
public final Object get(Object bean)
throws Exception
- Description copied from class:
BeanPropertyWriter
- Method that can be used to access value of the property this
Object describes, from given bean instance.
Note: method is final as it should not need to be overridden -- rather,
calling method(s) (BeanPropertyWriter.serializeAsField(java.lang.Object, org.codehaus.jackson.JsonGenerator, org.codehaus.jackson.map.SerializerProvider)) should be overridden
to change the behavior
- Specified by:
get in class BeanPropertyWriter
- Throws:
Exception
toString
public String toString()
- Overrides:
toString in class Object
getGenericPropertyType
public Type getGenericPropertyType()
- Description copied from class:
BeanPropertyWriter
- Get the generic property type of this property writer.
- Specified by:
getGenericPropertyType in class BeanPropertyWriter
- Returns:
- The property type, or null if not found.