public abstract class VirtualBeanPropertyWriter extends BeanPropertyWriter implements java.io.Serializable
BeanPropertyWriter
implementation used with
JsonAppend
to add "virtual" properties in addition to regular ones.AttributePropertyWriter
,
Serialized FormBeanProperty.Bogus, BeanProperty.Std
MARKER_FOR_EMPTY
EMPTY_FORMAT, EMPTY_INCLUDE
Modifier and Type | Method and Description |
---|---|
boolean |
isVirtual()
Accessor for checking whether there is an actual physical property
behind this property abstraction or not.
|
void |
serializeAsElement(java.lang.Object bean,
JsonGenerator gen,
SerializerProvider prov)
Alternative to
BeanPropertyWriter.serializeAsField(java.lang.Object, com.fasterxml.jackson.core.JsonGenerator, com.fasterxml.jackson.databind.SerializerProvider) that is used when a POJO is
serialized as JSON Array; the difference is that no field names are
written. |
void |
serializeAsField(java.lang.Object bean,
JsonGenerator gen,
SerializerProvider prov)
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.
|
abstract VirtualBeanPropertyWriter |
withConfig(MapperConfig<?> config,
AnnotatedClass declaringClass,
BeanPropertyDefinition propDef,
JavaType type)
Contextualization method called on a newly constructed virtual bean property.
|
assignNullSerializer, assignSerializer, assignTypeSerializer, depositSchemaProperty, depositSchemaProperty, fixAccess, 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
findAliases, findFormatOverrides, findPropertyFormat, findPropertyInclusion, getMetadata, isRequired
public boolean isVirtual()
BeanProperty
isVirtual
in interface BeanProperty
isVirtual
in class ConcreteBeanPropertyBase
public abstract VirtualBeanPropertyWriter withConfig(MapperConfig<?> config, AnnotatedClass declaringClass, BeanPropertyDefinition propDef, JavaType type)
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 propertypublic void serializeAsField(java.lang.Object bean, JsonGenerator gen, SerializerProvider prov) throws java.lang.Exception
BeanPropertyWriter
serializeAsField
in class BeanPropertyWriter
java.lang.Exception
public void serializeAsElement(java.lang.Object bean, JsonGenerator gen, SerializerProvider prov) throws java.lang.Exception
BeanPropertyWriter
BeanPropertyWriter.serializeAsField(java.lang.Object, com.fasterxml.jackson.core.JsonGenerator, com.fasterxml.jackson.databind.SerializerProvider)
that is used when a POJO is
serialized as JSON Array; the difference is that no field names are
written.serializeAsElement
in class BeanPropertyWriter
java.lang.Exception
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"