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 java.lang.String |
_attrName |
private static long |
serialVersionUID |
_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(java.lang.String attrName,
BeanPropertyDefinition propDef,
Annotations contextAnnotations,
JavaType declaredType) |
protected |
AttributePropertyWriter(java.lang.String attrName,
BeanPropertyDefinition propDef,
Annotations contextAnnotations,
JavaType declaredType,
com.fasterxml.jackson.annotation.JsonInclude.Value inclusion) |
Modifier and Type | Method and Description |
---|---|
static AttributePropertyWriter |
construct(java.lang.String attrName,
BeanPropertyDefinition propDef,
Annotations contextAnnotations,
JavaType declaredType) |
protected java.lang.Object |
value(java.lang.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, 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
private static final long serialVersionUID
protected final java.lang.String _attrName
protected AttributePropertyWriter(java.lang.String attrName, BeanPropertyDefinition propDef, Annotations contextAnnotations, JavaType declaredType)
protected AttributePropertyWriter(java.lang.String attrName, BeanPropertyDefinition propDef, Annotations contextAnnotations, JavaType declaredType, com.fasterxml.jackson.annotation.JsonInclude.Value inclusion)
protected AttributePropertyWriter(AttributePropertyWriter base)
public static AttributePropertyWriter construct(java.lang.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 java.lang.Object value(java.lang.Object bean, com.fasterxml.jackson.core.JsonGenerator jgen, SerializerProvider prov) throws java.lang.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
java.lang.Exception