BeanPropertyWriter implementation used with
com.fasterxml.jackson.databind.annotation.JsonAppend
to add "virtual" properties in addition to regular ones.
com.fasterxml.jackson.databind.ser.impl.AttributePropertyWriter
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | VirtualBeanPropertyWriter(BeanPropertyDefinition propDef, Annotations contextAnnotations, JavaType declaredType)
Constructor used by most sub-types. |
| protected | VirtualBeanPropertyWriter()
Constructor that may be used by sub-classes for constructing a "blue-print" instance;
one that will only become (or create) actual usable instance when its
|
| protected | VirtualBeanPropertyWriter(BeanPropertyDefinition propDef, Annotations contextAnnotations, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, JavaType serType, JsonInclude.
Pass-through constructor that may be used by sub-classes that want full control over implementation. |
| protected | VirtualBeanPropertyWriter(BeanPropertyDefinition propDef, Annotations contextAnnotations, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, JavaType serType, JsonInclude.
Deprecated
|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected static Object | |
| protected static boolean | |
| public boolean | isVirtual()
Overrides com. Implements com. Accessor for checking whether there is an actual physical property behind this property abstraction or not. |
| public void | serializeAsElement(Object bean, JsonGenerator gen, SerializerProvider prov)
Overrides com. Alternative to |
| public void | serializeAsField(Object bean, JsonGenerator gen, SerializerProvider prov)
Overrides com. 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. |
| protected abstract Object | value(Object bean, JsonGenerator gen, SerializerProvider prov)
Method called to figure out the value to serialize. |
| public abstract VirtualBeanPropertyWriter | withConfig(MapperConfig<?>
Currenct configuration; guaranteed to be config, AnnotatedClass SerializationConfig
(just not typed since caller does not have dependency to serialization-specific types)Class that contains this property writer declaringClass, BeanPropertyDefinition Nominal property definition to use propDef, JavaType Declared type for the property type)Contextualization method called on a newly constructed virtual bean property. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| VirtualBeanPropertyWriter | back to summary |
|---|---|
| protected VirtualBeanPropertyWriter(BeanPropertyDefinition propDef, Annotations contextAnnotations, JavaType declaredType) Constructor used by most sub-types. | |
| VirtualBeanPropertyWriter | back to summary |
|---|---|
| protected VirtualBeanPropertyWriter() Constructor that may be used by sub-classes for constructing a "blue-print" instance;
one that will only become (or create) actual usable instance when its
| |
| VirtualBeanPropertyWriter | back to summary |
|---|---|
| protected VirtualBeanPropertyWriter(BeanPropertyDefinition propDef, Annotations contextAnnotations, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, JavaType serType, JsonInclude. Pass-through constructor that may be used by sub-classes that want full control over implementation. | |
| VirtualBeanPropertyWriter | back to summary |
|---|---|
| protected VirtualBeanPropertyWriter(BeanPropertyDefinition propDef, Annotations contextAnnotations, JavaType declaredType, JsonSerializer<?> ser, TypeSerializer typeSer, JavaType serType, JsonInclude. Deprecated
| |
| VirtualBeanPropertyWriter | back to summary |
|---|---|
| protected VirtualBeanPropertyWriter(VirtualBeanPropertyWriter base) | |
| VirtualBeanPropertyWriter | back to summary |
|---|---|
| protected VirtualBeanPropertyWriter(VirtualBeanPropertyWriter base, PropertyName name) | |
| _suppressableValue | back to summary |
|---|---|
| protected static Object _suppressableValue(JsonInclude. | |
| _suppressNulls | back to summary |
|---|---|
| protected static boolean _suppressNulls(JsonInclude. | |
| isVirtual | back to summary |
|---|---|
| public boolean isVirtual() Overrides com. Implements com. Doc from com. Accessor for checking whether there is an actual physical property behind this property abstraction or not.
| |
| serializeAsElement | back to summary |
|---|---|
| public void serializeAsElement(Object bean, JsonGenerator gen, SerializerProvider prov) throws Exception Overrides com. Doc from com. Alternative to
| |
| serializeAsField | back to summary |
|---|---|
| public void serializeAsField(Object bean, JsonGenerator gen, SerializerProvider prov) throws Exception Overrides com. Doc from com. 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.
| |
| value | back to summary |
|---|---|
| protected abstract Object value(Object bean, JsonGenerator gen, SerializerProvider prov) throws Exception Method called to figure out the value to serialize. For simple sub-types
(such as | |
| withConfig | back to summary |
|---|---|
| public abstract VirtualBeanPropertyWriter withConfig(MapperConfig<?> config, AnnotatedClass declaringClass, BeanPropertyDefinition propDef, JavaType type) Contextualization method called on a newly constructed virtual bean property. Usually a new intance needs to be created due to finality of some of configuration members; otherwise while recommended, creating a new instance is not strictly-speaking mandatory because calls are made in thread-safe manner, as part of initialization before use.
| |