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, _includeInViews, _internalSettings, _member, _name, _nonTrivialBaseType, _nullSerializer, _serializer, _suppressableValue, _suppressNulls, _typeSerializer, _wrapperName, MARKER_FOR_EMPTY
_format, _metadata
EMPTY_FORMAT, EMPTY_INCLUDE
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,
JsonInclude.Value inclusion) |
Modifier and Type | Method and Description |
---|---|
static AttributePropertyWriter |
construct(String attrName,
BeanPropertyDefinition propDef,
Annotations contextAnnotations,
JavaType declaredType) |
protected Object |
value(Object bean,
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, isVirtual, serializeAsElement, serializeAsField
_depositSchemaProperty, _findAndAddDynamic, _handleSelfReference, _new, assignNullSerializer, assignSerializer, assignTypeSerializer, depositSchemaProperty, depositSchemaProperty, get, getAnnotation, getContextAnnotation, getFullName, getGenericPropertyType, getInternalSetting, getMember, getName, getPropertyType, getRawSerializationType, getSerializationType, getSerializedName, getSerializer, getType, getTypeSerializer, getViews, getWrapperName, hasNullSerializer, hasSerializer, isUnwrapping, removeInternalSetting, rename, serializeAsOmittedField, serializeAsPlaceholder, setInternalSetting, setNonTrivialBaseType, toString, unwrappingWriter, willSuppressNulls, wouldConflictWithName
findAnnotation
findFormatOverrides, findPropertyFormat, findPropertyInclusion, getMetadata, isRequired
protected final String _attrName
protected AttributePropertyWriter(String attrName, BeanPropertyDefinition propDef, Annotations contextAnnotations, JavaType declaredType)
protected AttributePropertyWriter(String attrName, BeanPropertyDefinition propDef, Annotations contextAnnotations, JavaType declaredType, JsonInclude.Value 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, 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 © 2008–2016 FasterXML. All rights reserved.