public class AttributePropertyWriter extends VirtualBeanPropertyWriter
VirtualBeanPropertyWriter
implementation used for
JsonAppend
,
to serialize properties backed-by dynamically assignable attribute
values.BeanProperty.Std
Modifier and Type | Field and Description |
---|---|
protected String |
_attrName |
_accessorMethod, _cfgSerializationType, _contextAnnotations, _declaredType, _dynamicSerializers, _field, _format, _includeInViews, _internalSettings, _member, _metadata, _name, _nonTrivialBaseType, _nullSerializer, _serializer, _suppressableValue, _suppressNulls, _typeSerializer, _wrapperName, MARKER_FOR_EMPTY, NO_FORMAT
Modifier | Constructor and Description |
---|---|
protected |
AttributePropertyWriter(AttributePropertyWriter base) |
protected |
AttributePropertyWriter(String attrName,
BeanPropertyDefinition propDef,
Annotations contextAnnotations,
JavaType declaredType) |
protected |
AttributePropertyWriter(String attrName,
BeanPropertyDefinition propDef,
Annotations contextAnnotations,
JavaType declaredType,
com.fasterxml.jackson.annotation.JsonInclude.Include inclusion) |
Modifier and Type | Method and Description |
---|---|
static AttributePropertyWriter |
construct(String attrName,
BeanPropertyDefinition propDef,
Annotations contextAnnotations,
JavaType declaredType) |
protected Object |
value(Object bean,
com.fasterxml.jackson.core.JsonGenerator jgen,
SerializerProvider prov)
Method called to figure out the value to serialize.
|
VirtualBeanPropertyWriter |
withConfig(MapperConfig<?> config,
AnnotatedClass declaringClass,
BeanPropertyDefinition propDef,
JavaType type)
Since this method should typically not be called on this sub-type,
default implementation simply throws an
IllegalStateException . |
_suppressableValue, _suppressNulls, getGenericPropertyType, getPropertyType, isVirtual, serializeAsElement, serializeAsField
_depositSchemaProperty, _findAndAddDynamic, _handleSelfReference, _new, assignNullSerializer, assignSerializer, assignTypeSerializer, depositSchemaProperty, depositSchemaProperty, findFormatOverrides, get, getAnnotation, getContextAnnotation, getFullName, getInternalSetting, getMember, getMetadata, getName, getRawSerializationType, getSerializationType, getSerializedName, getSerializer, getType, getTypeSerializer, getViews, getWrapperName, hasNullSerializer, hasSerializer, isRequired, isUnwrapping, removeInternalSetting, rename, serializeAsOmittedField, serializeAsPlaceholder, setInternalSetting, setNonTrivialBaseType, toString, unwrappingWriter, willSuppressNulls, wouldConflictWithName
findAnnotation
protected final String _attrName
protected AttributePropertyWriter(String attrName, BeanPropertyDefinition propDef, Annotations contextAnnotations, JavaType declaredType)
protected AttributePropertyWriter(String attrName, BeanPropertyDefinition propDef, Annotations contextAnnotations, JavaType declaredType, com.fasterxml.jackson.annotation.JsonInclude.Include inclusion)
protected AttributePropertyWriter(AttributePropertyWriter base)
public static AttributePropertyWriter construct(String attrName, BeanPropertyDefinition propDef, Annotations contextAnnotations, JavaType declaredType)
public VirtualBeanPropertyWriter withConfig(MapperConfig<?> config, AnnotatedClass declaringClass, BeanPropertyDefinition propDef, JavaType type)
IllegalStateException
.withConfig
in class VirtualBeanPropertyWriter
config
- Currenct configuration; guaranteed to be SerializationConfig
(just not typed since caller does not have dependency to serialization-specific types)declaringClass
- Class that contains this property writerpropDef
- Nominal property definition to usetype
- Declared type for the propertyprotected Object value(Object bean, com.fasterxml.jackson.core.JsonGenerator jgen, SerializerProvider prov) throws Exception
VirtualBeanPropertyWriter
AttributePropertyWriter
)
this may be one of few methods to define, although more advanced implementations
may choose to not even use this method (by overriding VirtualBeanPropertyWriter.serializeAsField(java.lang.Object, com.fasterxml.jackson.core.JsonGenerator, com.fasterxml.jackson.databind.SerializerProvider)
)
and define a bogus implementation.value
in class VirtualBeanPropertyWriter
Exception
Copyright © 2014–2015 FasterXML. All rights reserved.