public abstract class PropertyWriter extends ConcreteBeanPropertyBase implements java.io.Serializable
Map
serializers, and invoked
by filtering functionality.BeanProperty.Bogus, BeanProperty.Std
EMPTY_FORMAT, EMPTY_INCLUDE
Modifier and Type | Method and Description |
---|---|
abstract void |
depositSchemaProperty(JsonObjectFormatVisitor objectVisitor,
SerializerProvider provider)
Traversal method used for things like JSON Schema generation, or
POJO introspection.
|
abstract void |
depositSchemaProperty(ObjectNode propertiesNode,
SerializerProvider provider)
Deprecated.
Since 2.2
|
<A extends java.lang.annotation.Annotation> |
findAnnotation(java.lang.Class<A> acls)
Convenience method for accessing annotation that may be associated
either directly on property, or, if not, via enclosing class (context).
|
abstract <A extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<A> acls)
Method for accessing annotations directly declared for property that this
writer is associated with.
|
abstract <A extends java.lang.annotation.Annotation> |
getContextAnnotation(java.lang.Class<A> acls)
Method for accessing annotations declared in context of the property that this
writer is associated with; usually this means annotations on enclosing class
for property.
|
abstract PropertyName |
getFullName()
Method for getting full name definition, including possible
format-specific additional properties (such as namespace when
using XML backend).
|
abstract java.lang.String |
getName()
Method to get logical name of the property
|
abstract void |
serializeAsElement(java.lang.Object value,
JsonGenerator jgen,
SerializerProvider provider)
Serialization method called when output is to be done as an array,
that is, not using property names.
|
abstract void |
serializeAsField(java.lang.Object value,
JsonGenerator jgen,
SerializerProvider provider)
The main serialization method called by filter when property is to be written normally.
|
abstract void |
serializeAsOmittedField(java.lang.Object value,
JsonGenerator jgen,
SerializerProvider provider)
Serialization method that filter needs to call in cases where property is to be
filtered, but the underlying data format requires a placeholder of some kind.
|
abstract void |
serializeAsPlaceholder(java.lang.Object value,
JsonGenerator jgen,
SerializerProvider provider)
Serialization method called when doing tabular (positional) output from databind,
but then value is to be omitted.
|
findAliases, findFormatOverrides, findPropertyFormat, findPropertyInclusion, getMetadata, isRequired, isVirtual
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMember, getType, getWrapperName
public abstract java.lang.String getName()
BeanProperty
getName
in interface BeanProperty
getName
in interface Named
public abstract PropertyName getFullName()
BeanProperty
getFullName
in interface BeanProperty
public <A extends java.lang.annotation.Annotation> A findAnnotation(java.lang.Class<A> acls)
This method is functionally equivalent to:
MyAnnotation ann = propWriter.getAnnotation(MyAnnotation.class); if (ann == null) { ann = propWriter.getContextAnnotation(MyAnnotation.class); }that is, tries to find a property annotation first, but if one is not found, tries to find context-annotation (from enclosing class) of same type.
public abstract <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> acls)
getAnnotation
in interface BeanProperty
public abstract <A extends java.lang.annotation.Annotation> A getContextAnnotation(java.lang.Class<A> acls)
getContextAnnotation
in interface BeanProperty
public abstract void serializeAsField(java.lang.Object value, JsonGenerator jgen, SerializerProvider provider) throws java.lang.Exception
java.lang.Exception
public abstract void serializeAsOmittedField(java.lang.Object value, JsonGenerator jgen, SerializerProvider provider) throws java.lang.Exception
java.lang.Exception
public abstract void serializeAsElement(java.lang.Object value, JsonGenerator jgen, SerializerProvider provider) throws java.lang.Exception
Collection
, array) types,
or POJOs using tabular
("as array") output format.
Note that this mode of operation is independent of underlying data format; so it is typically NOT called for fully tabular formats such as CSV, where logical output is still as form of POJOs.
java.lang.Exception
public abstract void serializeAsPlaceholder(java.lang.Object value, JsonGenerator jgen, SerializerProvider provider) throws java.lang.Exception
serializeAsOmittedField(java.lang.Object, com.fasterxml.jackson.core.JsonGenerator, com.fasterxml.jackson.databind.SerializerProvider)
.java.lang.Exception
public abstract void depositSchemaProperty(JsonObjectFormatVisitor objectVisitor, SerializerProvider provider) throws JsonMappingException
depositSchemaProperty
in interface BeanProperty
objectVisitor
- Visitor to used as the callback handlerJsonMappingException
@Deprecated public abstract void depositSchemaProperty(ObjectNode propertiesNode, SerializerProvider provider) throws JsonMappingException
JsonMappingException
Copyright © 2010 - 2020 Adobe. All Rights Reserved