JacksonAnnotationIntrospector that is needed to support
additional xml-specific annotation that Jackson provides. Note, however, that
there is no JAXB annotation support here; that is provided with
separate introspector (see
https://github.com/FasterXML/jackson-modules-base/tree/master/jaxb,
class com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector).
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | |
| private static final Class | |
| public static final boolean | DEFAULT_USE_WRAPPER
For backwards compatibility with 2.0, the default behavior is to assume use of List wrapper if no annotations are used. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected PropertyName | |
| public PropertyName | findNameForDeserialization(MapperConfig<?> config, Annotated a)
Overrides tools. Method for checking whether given property accessors (method, field) has an annotation that suggests property name to use for deserialization (reading JSON into POJOs). |
| public PropertyName | findNameForSerialization(MapperConfig<?> config, Annotated a)
Overrides tools. Method for checking whether given property accessors (method, field) has an annotation that suggests property name to use for serialization. |
| public String | findNamespace(MapperConfig<?> config, Annotated ann)
Implements tools. Method that can be called to figure out generic namespace property for an annotated object. |
| public PropertyName | findRootName(MapperConfig<?> config, AnnotatedClass ac)
Overrides tools. Method for locating name used as "root name" (for use by some serializers when outputting root-level object -- mostly for XML compatibility purposes) for given class, if one is defined. |
| public PropertyName | findWrapperName(MapperConfig<?> config, Annotated ann)
Overrides tools. Method used to check if specified property has annotation that indicates that it should be wrapped in an element; and if so, name to use. |
| public Boolean | isOutputAsAttribute(MapperConfig<?> config, Annotated ann)
Implements tools. Method used to check whether given annotated element (field, method, constructor parameter) has indicator that suggests it be output as an XML attribute or not (if not, then as element) |
| public Boolean | isOutputAsCData(MapperConfig<?> config, Annotated ann)
Implements tools. Method used to check whether given annotated element (field, method, constructor parameter) has indicator that suggests it should be wrapped in a CDATA tag. |
| public Boolean | isOutputAsText(MapperConfig<?> config, Annotated ann)
Implements tools. Method used to check whether given annotated element (field, method, constructor parameter) has indicator that suggests it should be serialized as text, without element wrapper. |
| public void |
| _cfgDefaultUseWrapper | back to summary |
|---|---|
| protected boolean _cfgDefaultUseWrapper | |
| ANNOTATIONS_TO_INFER_XML_PROP | back to summary |
|---|---|
private static final Class<? extends Annotation>[] ANNOTATIONS_TO_INFER_XML_PROP
| |
| DEFAULT_USE_WRAPPER | back to summary |
|---|---|
| public static final boolean DEFAULT_USE_WRAPPER For backwards compatibility with 2.0, the default behavior is to assume use of List wrapper if no annotations are used. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tools. | |
| JacksonXmlAnnotationIntrospector | back to summary |
|---|---|
| public JacksonXmlAnnotationIntrospector() | |
| JacksonXmlAnnotationIntrospector | back to summary |
|---|---|
| public JacksonXmlAnnotationIntrospector(boolean defaultUseWrapper) | |
| _findXmlName | back to summary |
|---|---|
| protected PropertyName _findXmlName(Annotated a) | |
| findNameForDeserialization | back to summary |
|---|---|
| public PropertyName findNameForDeserialization(MapperConfig<?> config, Annotated a) Overrides tools. Doc from tools. Method for checking whether given property accessors (method,
field) has an annotation that suggests property name to use
for deserialization (reading JSON into POJOs).
Should return null if no annotation
is found; otherwise a non-null name (possibly
| |
| findNameForSerialization | back to summary |
|---|---|
| public PropertyName findNameForSerialization(MapperConfig<?> config, Annotated a) Overrides tools. Doc from tools. Method for checking whether given property accessors (method,
field) has an annotation that suggests property name to use
for serialization.
Should return null if no annotation
is found; otherwise a non-null name (possibly
| |
| findNamespace | back to summary |
|---|---|
| public String findNamespace(MapperConfig<?> config, Annotated ann) Implements tools. Doc from tools. Method that can be called to figure out generic namespace property for an annotated object.
| |
| findRootName | back to summary |
|---|---|
| public PropertyName findRootName(MapperConfig<?> config, AnnotatedClass ac) Overrides tools. Doc from tools. Method for locating name used as "root name" (for use by some serializers when outputting root-level object -- mostly for XML compatibility purposes) for given class, if one is defined. Returns null if no declaration found; can return explicit empty String, which is usually ignored as well as null.
| |
| findWrapperName | back to summary |
|---|---|
| public PropertyName findWrapperName(MapperConfig<?> config, Annotated ann) Overrides tools. Doc from tools. Method used to check if specified property has annotation that indicates that it should be wrapped in an element; and if so, name to use. Note that not all serializers and deserializers support use this method: currently (3.0) it is only used by XML-backed handlers.
| |
| isOutputAsAttribute | back to summary |
|---|---|
| public Boolean isOutputAsAttribute(MapperConfig<?> config, Annotated ann) Implements tools. Doc from tools. Method used to check whether given annotated element (field, method, constructor parameter) has indicator that suggests it be output as an XML attribute or not (if not, then as element)
| |
| isOutputAsCData | back to summary |
|---|---|
| public Boolean isOutputAsCData(MapperConfig<?> config, Annotated ann) Implements tools. Doc from tools. Method used to check whether given annotated element (field, method, constructor parameter) has indicator that suggests it should be wrapped in a CDATA tag.
| |
| isOutputAsText | back to summary |
|---|---|
| public Boolean isOutputAsText(MapperConfig<?> config, Annotated ann) Implements tools. Doc from tools. Method used to check whether given annotated element (field, method, constructor parameter) has indicator that suggests it should be serialized as text, without element wrapper.
| |
| setDefaultUseWrapper | back to summary |
|---|---|
| public void setDefaultUseWrapper(boolean b) | |