![JAR search and dependency download from the Maven repository](/logo.png)
org.codehaus.jackson.map.ser.BeanPropertyWriter Maven / Gradle / Ivy
Go to download
Data Mapper package is a high-performance data binding package
built on Jackson JSON processor
package org.codehaus.jackson.map.ser;
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.SerializerProvider;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
/**
* Base bean property handler class, which implements common parts of
* reflection-based functionality for accessing a property value
* and serializing it.
*/
public class BeanPropertyWriter
{
/*
//////////////////////////////////////////////////////
// Settings for accessing property value to serialize
//////////////////////////////////////////////////////
*/
/**
* Accessor method used to get property value, for
* method-accessible properties.
* Null if and only if {@link #_field} is null.
*/
protected final Method _accessorMethod;
/**
* Field that contains the property value for field-accessible
* properties.
* Null if and only if {@link #_accessorMethod} is null.
*/
protected final Field _field;
/*
//////////////////////////////////////////////////////
// Serialization settings
//////////////////////////////////////////////////////
*/
/**
* Logical name of the property; will be used as the field name
* under which value for the property is written.
*/
protected final String _name;
/**
* Type to use for locating serializer; normally same as return
* type of the accessor method, but may be overridden by annotations.
*/
protected final Class> _cfgSerializationType;
/**
* Serializer to use for writing out the value: null if it can not
* be known statically; non-null if it can.
*/
protected final JsonSerializer
© 2015 - 2025 Weber Informatics LLC | Privacy Policy