Class JakartaXmlBindAnnotationIntrospector
- All Implemented Interfaces:
Versioned,AnnotationIntrospector.XmlExtensions,Serializable
XmlAnyAttributenot supported; possible (if unlikely) to be used (as an alias for@JsonAnySetter)XmlAnyElementnot supported; unlikely to ever be supported.XmlAttachmentRef: JSON does not support external attachmentsXmlElementDeclXmlElementRefsbecause Jackson doesn't have any support for 'named' collection itemsXmlInlineBinaryDatasince the underlying concepts (like XOP) do not exist in JSON -- Jackson will always use inline base64 encoding as the methodXmlListbecause JSON does not have (or necessarily need) method of serializing list of values as space-separated StringsXmlMimeTypeXmlMixedsince JSON has no concept of mixed contentXmlRegistrynot supported, unlikely to ever be.XmlSchemanot supported, unlikely to ever be.XmlSchemaTypenot supported, unlikely to ever be.XmlSchemaTypesnot supported, unlikely to ever be.XmlSeeAlsonot supported.
- Any property annotated with
XmlValuewill have implicit property named 'value' on its JSON object; although it should be possible to override this name
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.AnnotationIntrospector
AnnotationIntrospector.ReferenceProperty, AnnotationIntrospector.XmlExtensions -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final JsonDeserializer<?>protected final JsonSerializer<?>protected final booleanprotected final Stringprotected JsonInclude.IncludeInclusion value to return for properties annotated withXmlElementandXmlElementWrapper, in casenillableproperty is left asfalse.protected final TypeFactoryprotected StringWhen usingXmlValueannotation, a placeholder name is assigned to property (unless overridden by explicit name); this configuration value specified what that name is.protected static final booleanprotected static final Stringprotected static final JsonFormat.Valueprotected static final JsonFormat.Valueprotected static final String -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Since 2.1, use constructor that takes TypeFactory.JakartaXmlBindAnnotationIntrospector(MapperConfig<?> config) JakartaXmlBindAnnotationIntrospector(TypeFactory typeFactory) JakartaXmlBindAnnotationIntrospector(TypeFactory typeFactory, boolean ignoreXmlIDREF) -
Method Summary
Modifier and TypeMethodDescription_converter(XmlAdapter<?, ?> adapter, boolean forSerialization) protected String_decapitalize(String name) protected Class<?>_doFindDeserializationType(Annotated a, JavaType baseType) protected XmlAdapter<?,?> _findContentAdapter(Annotated ann, boolean forSerialization) protected JavaTypeprotected JavaTypeprotected Class<?>protected Stringprotected Stringprotected Stringprotected Class<?>protected Class<?>protected String_stdManglePropertyName(String basename, int offset) protected TypeResolverBuilder<?>protected XmlAccessTypeMethod for locating JAXBXmlAccessTypeannotation value for given annotated entity, if it has one, or inherits one from its ancestors (in JAXB sense, package etc).findAutoDetectVisibility(AnnotatedClass ac, VisibilityChecker<?> checker) Method for checking if annotations indicate changes to minimum visibility levels needed for auto-detecting property elements (fields, methods, constructors).Method for getting a deserializer definition for content (values) of associatedCollection,arrayorMapproperty.Method for getting a serializer definition for content (values) of associatedCollection,arrayorMapproperty.Method for findingConverterthat annotated property has indicated needs to be used for values of container type (this also means that method should only be called for properties of container types, List/Map/array properties).Method for findingConverterthat annotated entity (property or class) has indicated to be used as part of deserialization.Method for getting a deserializer definition on specified method or field.String[]findEnumValues(MapperConfig<?> config, AnnotatedClass annotatedClass, Enum<?>[] enumValues, String[] names) Finds the explicitly defined name of the given set ofEnumvalues, if any.String[]findEnumValues(Class<?> enumType, Enum<?>[] enumValues, String[] names) Deprecated.Method for finding format annotations for property or class.Method for finding implicit name for a property that given annotated member (field, method, creator parameter) may represent.Method for getting a deserializer definition for keys of associatedMapproperty.Method for checking whether given property accessors (method, field) has an annotation that suggests property name to use for deserialization (reading JSON into POJOs).Method for checking whether given property accessors (method, field) has an annotation that suggests property name to use for serialization.findNamespace(MapperConfig<?> config, Annotated ann) Method that can be called to figure out generic namespace property for an annotated object.Method for checking whether given annotated thing (type, or accessor) indicates that values referenced (values of type of annotated class, or values referenced by annotated property; latter having precedence) should include Object Identifier, and if so, specify details of Object Identity used.findObjectReferenceInfo(Annotated ann, ObjectIdInfo base) Method for figuring out additional properties of an Object Identity referencefindPropertyContentTypeResolver(MapperConfig<?> config, AnnotatedMember am, JavaType containerType) Method for checking if given structured property entity (field or method that has nominal value of Map, Collection or array type) has annotations that indicate that specific type resolver is to be used for handling type information of contained values.Method for checking inclusion criteria for a type (Class) or property (yes, method name is bit unfortunate -- not just for properties!).findPropertyTypeResolver(MapperConfig<?> config, AnnotatedMember am, JavaType baseType) Method for checking if given property entity (field or method) has annotations that indicate that specific type resolver is to be used for handling instances.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.Method for findingConverterthat annotated property has indicated needs to be used for values of container type (this also means that method should only be called for properties of container types, List/Map/array properties).Method for findingConverterthat annotated entity (property or class) has indicated to be used as part of serialization.String[]Method for accessing defined property serialization order (which may be partial).Method for checking whether an annotation indicates that serialized properties for which no explicit is defined should be alphabetically (lexicograpically) orderedMethod for getting a serializer definition on specified method or field.Method for locating annotation-specified subtypes related to annotated entity (class, method, field).Method for checking if specified type has explicit name.findTypeResolver(MapperConfig<?> config, AnnotatedClass ac, JavaType baseType) Method for checking if given class has annotations that indicate that specific type resolver is to be used for handling instances.findWrapperName(Annotated ann) 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.Accessor for getting currently configured placeholder named used for property annotated withXmlValue.protected final TypeFactorybooleanMethod called to check whether given property is marked to be ignored.Method that can be called to check whether this member has an annotation that suggests whether value for matching property is required or not.Method for checking whether properties that have specified type (class, not generics aware) should be completely ignored for serialization and deserialization purposes.protected booleanAn annotation is handled if it's in the same package as @XmlElement, including subpackages.isOutputAsAttribute(MapperConfig<?> config, Annotated ann) Here we assume fairly simple logic; if there isXmlAttributeto be found, we consider it an attribute; ifXmlElement, not-an-attribute; and otherwise we will consider there to be no information.isOutputAsCData(MapperConfig<?> config, Annotated ann) 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(MapperConfig<?> config, Annotated ann) 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.refineDeserializationType(MapperConfig<?> config, Annotated a, JavaType baseType) Method called to find out possible type refinements to use for deserialization.refineSerializationType(MapperConfig<?> config, Annotated a, JavaType baseType) Method called to find out possible type refinements to use for deserialization, including not just value itself but key and/or content type, if type has those.voidsetNameUsedForXmlValue(String name) Configuration method that can be used to change default name ("value") used for properties annotated withXmlValue; note that setting it tonullwill actually avoid name override, and name will instead be derived from underlying method name using standard bean name introspection.Method to call to change inclusion criteria used for property annotated withXmlElementorXmlElementWrapper, withnillableset asfalse.version()Method that will return version information stored in and read from jar that contains this class.Methods inherited from class com.fasterxml.jackson.databind.AnnotationIntrospector
_findAnnotation, _hasAnnotation, _hasOneOf, allIntrospectors, allIntrospectors, findAndAddVirtualProperties, findClassDescription, findCreatorAnnotation, findCreatorBinding, findDefaultCreator, findDefaultEnumValue, findDefaultEnumValue, findEnumAliases, findEnumAliases, findEnumNamingStrategy, findEnumValue, findFilterId, findInjectableValue, findInjectableValueId, findKeySerializer, findMergeInfo, findNamingStrategy, findNullSerializer, findPOJOBuilder, findPOJOBuilderConfig, findPolymorphicTypeInfo, findPropertyAccess, findPropertyAliases, findPropertyDefaultValue, findPropertyDescription, findPropertyIgnoralByName, findPropertyIgnorals, findPropertyInclusionByName, findPropertyIndex, findReferenceType, findRenameByField, findSerializationTyping, findSetterInfo, findUnwrappingNameTransformer, findValueInstantiator, findViews, hasAnyGetter, hasAnyGetterAnnotation, hasAnySetter, hasAnySetterAnnotation, hasAsKey, hasAsValue, hasAsValueAnnotation, hasCreatorAnnotation, isAnnotationBundle, isTypeId, nopInstance, pair, resolveSetterConflict
-
Field Details
-
DEFAULT_NAME_FOR_XML_VALUE
- See Also:
-
DEFAULT_IGNORE_XMLIDREF
protected static final boolean DEFAULT_IGNORE_XMLIDREF- See Also:
-
MARKER_FOR_DEFAULT
- See Also:
-
FORMAT_STRING
-
FORMAT_INT
-
_jaxbPackageName
-
_dataHandlerSerializer
-
_dataHandlerDeserializer
-
_typeFactory
-
_ignoreXmlIDREF
protected final boolean _ignoreXmlIDREF -
_xmlValueName
When usingXmlValueannotation, a placeholder name is assigned to property (unless overridden by explicit name); this configuration value specified what that name is. -
_nonNillableInclusion
Inclusion value to return for properties annotated withXmlElementandXmlElementWrapper, in casenillableproperty is left asfalse. Default setting isnull; this is typically changed to eitherJsonInclude.Include.NON_NULLorJsonInclude.Include.NON_EMPTY.- Since:
- 2.7
-
-
Constructor Details
-
JakartaXmlBindAnnotationIntrospector
Deprecated.Since 2.1, use constructor that takes TypeFactory. -
JakartaXmlBindAnnotationIntrospector
-
JakartaXmlBindAnnotationIntrospector
-
JakartaXmlBindAnnotationIntrospector
- Parameters:
typeFactory- Type factory used for resolving type informationignoreXmlIDREF- WhetherXmlIDREFannotation should be processed JAXB style (meaning that references are always serialized using id), or not (first reference as full POJO, others as ids)
-
-
Method Details
-
version
Method that will return version information stored in and read from jar that contains this class.- Specified by:
versionin interfaceVersioned- Specified by:
versionin classAnnotationIntrospector- Returns:
- Version of the component
-
setNameUsedForXmlValue
Configuration method that can be used to change default name ("value") used for properties annotated withXmlValue; note that setting it tonullwill actually avoid name override, and name will instead be derived from underlying method name using standard bean name introspection. -
getNameUsedForXmlValue
Accessor for getting currently configured placeholder named used for property annotated withXmlValue. -
setNonNillableInclusion
Method to call to change inclusion criteria used for property annotated withXmlElementorXmlElementWrapper, withnillableset asfalse.- Since:
- 2.7
-
getNonNillableInclusion
- Since:
- 2.7
-
findNamespace
Description copied from interface:AnnotationIntrospector.XmlExtensionsMethod that can be called to figure out generic namespace property for an annotated object.- Specified by:
findNamespacein interfaceAnnotationIntrospector.XmlExtensions- Parameters:
config- Configuration settings in effectann- Annotated entity to introspect- Returns:
- Null if annotated thing does not define any namespace information; non-null namespace (which may be empty String) otherwise.
-
isOutputAsAttribute
Here we assume fairly simple logic; if there isXmlAttributeto be found, we consider it an attribute; ifXmlElement, not-an-attribute; and otherwise we will consider there to be no information. Caller is likely to default to considering things as elements.- Specified by:
isOutputAsAttributein interfaceAnnotationIntrospector.XmlExtensions- Parameters:
config- Configuration settings in effectann- Annotated entity to introspect- Returns:
- Null if no indicator found;
TrueorFalseotherwise
-
isOutputAsText
Description copied from interface:AnnotationIntrospector.XmlExtensionsMethod used to check whether given annotated element (field, method, constructor parameter) has indicator that suggests it should be serialized as text, without element wrapper.- Specified by:
isOutputAsTextin interfaceAnnotationIntrospector.XmlExtensions- Parameters:
config- Configuration settings in effectann- Annotated entity to introspect- Returns:
- Null if no indicator found;
TrueorFalseotherwise
-
isOutputAsCData
Description copied from interface:AnnotationIntrospector.XmlExtensionsMethod used to check whether given annotated element (field, method, constructor parameter) has indicator that suggests it should be wrapped in a CDATA tag.- Specified by:
isOutputAsCDatain interfaceAnnotationIntrospector.XmlExtensions- Parameters:
config- Configuration settings in effectann- Annotated entity to introspect- Returns:
- Null if no indicator found;
TrueorFalseotherwise
-
findObjectIdInfo
Description copied from class:AnnotationIntrospectorMethod for checking whether given annotated thing (type, or accessor) indicates that values referenced (values of type of annotated class, or values referenced by annotated property; latter having precedence) should include Object Identifier, and if so, specify details of Object Identity used.- Overrides:
findObjectIdInfoin classAnnotationIntrospector- Parameters:
ann- Annotated entity to introspect- Returns:
- Details of Object Id as explained above, if Object Id
handling to be applied;
nullotherwise.
-
findObjectReferenceInfo
Description copied from class:AnnotationIntrospectorMethod for figuring out additional properties of an Object Identity reference- Overrides:
findObjectReferenceInfoin classAnnotationIntrospector- Parameters:
ann- Annotated entity to introspectbase- (optional) Base Object Id information, if any;nullif none- Returns:
ObjectIdInfoaugmented with possible additional information
-
findRootName
Description copied from class:AnnotationIntrospectorMethod 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.NOTE: method signature changed in 2.1, to return
PropertyNameinstead of String.- Overrides:
findRootNamein classAnnotationIntrospector- Parameters:
ac- Annotated class to introspect- Returns:
- Root name to use, if any;
nullif not
-
isIgnorableType
Description copied from class:AnnotationIntrospectorMethod for checking whether properties that have specified type (class, not generics aware) should be completely ignored for serialization and deserialization purposes.- Overrides:
isIgnorableTypein classAnnotationIntrospector- Parameters:
ac- Annotated class to introspect- Returns:
- Boolean.TRUE if properties of type should be ignored; Boolean.FALSE if they are not to be ignored, null for default handling (which is 'do not ignore')
-
hasIgnoreMarker
Description copied from class:AnnotationIntrospectorMethod called to check whether given property is marked to be ignored. This is used to determine whether to ignore properties, on per-property basis, usually combining annotations from multiple accessors (getters, setters, fields, constructor parameters).- Overrides:
hasIgnoreMarkerin classAnnotationIntrospector
-
hasRequiredMarker
Description copied from class:AnnotationIntrospectorMethod that can be called to check whether this member has an annotation that suggests whether value for matching property is required or not.- Overrides:
hasRequiredMarkerin classAnnotationIntrospector
-
findWrapperName
Description copied from class:AnnotationIntrospectorMethod 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 (2.1) it is only used by XML-backed handlers.- Overrides:
findWrapperNamein classAnnotationIntrospector- Returns:
- Wrapper name to use, if any, or
PropertyName.USE_DEFAULTto indicate that no wrapper element should be used.
-
findImplicitPropertyName
Description copied from class:AnnotationIntrospectorMethod for finding implicit name for a property that given annotated member (field, method, creator parameter) may represent. This is different from explicit, annotation-based property name, in that it is "weak" and does not either proof that a property exists (for example, if visibility is not high enough), or override explicit names. In practice this method is used to introspect optional names for creator parameters (which may or may not be available and cannot be detected by standard databind); or to provide alternate name mangling for fields, getters and/or setters.- Overrides:
findImplicitPropertyNamein classAnnotationIntrospector
-
findFormat
Description copied from class:AnnotationIntrospectorMethod for finding format annotations for property or class. Return value is typically used by serializers and/or deserializers to customize presentation aspects of the serialized value.- Overrides:
findFormatin classAnnotationIntrospector
-
findAutoDetectVisibility
public VisibilityChecker<?> findAutoDetectVisibility(AnnotatedClass ac, VisibilityChecker<?> checker) Description copied from class:AnnotationIntrospectorMethod for checking if annotations indicate changes to minimum visibility levels needed for auto-detecting property elements (fields, methods, constructors). A baseline checker is given, and introspector is to either return it as is (if no annotations are found), or build and return a derived instance (using checker's build methods).- Overrides:
findAutoDetectVisibilityin classAnnotationIntrospector- Parameters:
ac- Annotated class to introspectchecker- Default visibility settings in effect before any override- Returns:
- Visibility settings after possible annotation-based overrides
-
findAccessType
Method for locating JAXBXmlAccessTypeannotation value for given annotated entity, if it has one, or inherits one from its ancestors (in JAXB sense, package etc). Returns null if nothing has been explicitly defined. -
findTypeResolver
public TypeResolverBuilder<?> findTypeResolver(MapperConfig<?> config, AnnotatedClass ac, JavaType baseType) Description copied from class:AnnotationIntrospectorMethod for checking if given class has annotations that indicate that specific type resolver is to be used for handling instances. This includes not only instantiating resolver builder, but also configuring it based on relevant annotations (not including ones checked with a call toAnnotationIntrospector.findSubtypes(com.fasterxml.jackson.databind.introspect.Annotated)- Overrides:
findTypeResolverin classAnnotationIntrospector- Parameters:
config- Configuration settings in effect (for serialization or deserialization)ac- Annotated class to check for annotationsbaseType- Base java type of value for which resolver is to be found- Returns:
- Type resolver builder for given type, if one found; null if none
-
findPropertyTypeResolver
public TypeResolverBuilder<?> findPropertyTypeResolver(MapperConfig<?> config, AnnotatedMember am, JavaType baseType) Description copied from class:AnnotationIntrospectorMethod for checking if given property entity (field or method) has annotations that indicate that specific type resolver is to be used for handling instances. This includes not only instantiating resolver builder, but also configuring it based on relevant annotations (not including ones checked with a call toAnnotationIntrospector.findSubtypes(com.fasterxml.jackson.databind.introspect.Annotated)- Overrides:
findPropertyTypeResolverin classAnnotationIntrospector- Parameters:
config- Configuration settings in effect (for serialization or deserialization)am- Annotated member (field or method) to check for annotationsbaseType- Base java type of property for which resolver is to be found- Returns:
- Type resolver builder for properties of given entity, if one found; null if none
-
findPropertyContentTypeResolver
public TypeResolverBuilder<?> findPropertyContentTypeResolver(MapperConfig<?> config, AnnotatedMember am, JavaType containerType) Description copied from class:AnnotationIntrospectorMethod for checking if given structured property entity (field or method that has nominal value of Map, Collection or array type) has annotations that indicate that specific type resolver is to be used for handling type information of contained values. This includes not only instantiating resolver builder, but also configuring it based on relevant annotations (not including ones checked with a call toAnnotationIntrospector.findSubtypes(com.fasterxml.jackson.databind.introspect.Annotated)- Overrides:
findPropertyContentTypeResolverin classAnnotationIntrospector- Parameters:
config- Configuration settings in effect (for serialization or deserialization)am- Annotated member (field or method) to check for annotationscontainerType- Type of property for which resolver is to be found (must be a container type)- Returns:
- Type resolver builder for values contained in properties of given entity, if one found; null if none
-
_typeResolverFromXmlElements
-
findSubtypes
Description copied from class:AnnotationIntrospectorMethod for locating annotation-specified subtypes related to annotated entity (class, method, field). Note that this is only guaranteed to be a list of directly declared subtypes, no recursive processing is guarantees (i.e. caller has to do it if/as necessary)- Overrides:
findSubtypesin classAnnotationIntrospector- Parameters:
a- Annotated entity (class, field/method) to check for annotations- Returns:
- List of subtype definitions found if any;
nullif none
-
findTypeName
Description copied from class:AnnotationIntrospectorMethod for checking if specified type has explicit name.- Overrides:
findTypeNamein classAnnotationIntrospector- Parameters:
ac- Class to check for type name annotations- Returns:
- Explicit type name (aka Type Id) found, if any;
nullif none
-
findSerializer
Description copied from class:AnnotationIntrospectorMethod for getting a serializer definition on specified method or field. Type of definition is either instance (of typeJsonSerializer) or Class (ofClass<JsonSerializer>implementation subtype); if value of different type is returned, a runtime exception may be thrown by caller.- Overrides:
findSerializerin classAnnotationIntrospector
-
findContentSerializer
Description copied from class:AnnotationIntrospectorMethod for getting a serializer definition for content (values) of associatedCollection,arrayorMapproperty. Type of definition is either instance (of typeJsonSerializer) or Class (of typeClass<JsonSerializer>); if value of different type is returned, a runtime exception may be thrown by caller.- Overrides:
findContentSerializerin classAnnotationIntrospector
-
findPropertyInclusion
Description copied from class:AnnotationIntrospectorMethod for checking inclusion criteria for a type (Class) or property (yes, method name is bit unfortunate -- not just for properties!). In case of class, acts as the default for properties POJO contains; for properties acts as override for class defaults and possible global defaults.- Overrides:
findPropertyInclusionin classAnnotationIntrospector
-
refineSerializationType
public JavaType refineSerializationType(MapperConfig<?> config, Annotated a, JavaType baseType) throws JsonMappingException Description copied from class:AnnotationIntrospectorMethod called to find out possible type refinements to use for deserialization, including not just value itself but key and/or content type, if type has those.- Overrides:
refineSerializationTypein classAnnotationIntrospector- Throws:
JsonMappingException
-
findSerializationPropertyOrder
Description copied from class:AnnotationIntrospectorMethod for accessing defined property serialization order (which may be partial). May return null if no ordering is defined.- Overrides:
findSerializationPropertyOrderin classAnnotationIntrospector
-
findSerializationSortAlphabetically
Description copied from class:AnnotationIntrospectorMethod for checking whether an annotation indicates that serialized properties for which no explicit is defined should be alphabetically (lexicograpically) ordered- Overrides:
findSerializationSortAlphabeticallyin classAnnotationIntrospector
-
findSerializationConverter
Description copied from class:AnnotationIntrospectorMethod for findingConverterthat annotated entity (property or class) has indicated to be used as part of serialization. If not null, either has to be actualConverterinstance, or class for such converter; and resulting converter will be used first to convert property value to converter target type, and then serializer for that type is used for actual serialization.This feature is typically used to convert internal values into types that Jackson can convert.
Note also that this feature does not necessarily work well with polymorphic type handling, or object identity handling; if such features are needed an explicit serializer is usually better way to handle serialization.
- Overrides:
findSerializationConverterin classAnnotationIntrospector- Parameters:
a- Annotated property (field, method) or class to check for annotations
-
findSerializationContentConverter
Description copied from class:AnnotationIntrospectorMethod for findingConverterthat annotated property has indicated needs to be used for values of container type (this also means that method should only be called for properties of container types, List/Map/array properties).If not null, either has to be actual
Converterinstance, or class for such converter; and resulting converter will be used first to convert property value to converter target type, and then serializer for that type is used for actual serialization.Other notes are same as those for
AnnotationIntrospector.findSerializationConverter(com.fasterxml.jackson.databind.introspect.Annotated)- Overrides:
findSerializationContentConverterin classAnnotationIntrospector- Parameters:
a- Annotated property (field, method) to check.
-
findNameForSerialization
Description copied from class:AnnotationIntrospectorMethod 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 (possiblyPropertyName.USE_DEFAULT, which means "use default heuristics").- Overrides:
findNameForSerializationin classAnnotationIntrospector- Parameters:
a- Property accessor to check- Returns:
- Name to use if found; null if not.
-
findEnumValues
Deprecated.Description copied from class:AnnotationIntrospectorMethod for efficiently figuring out which if given set ofEnumvalues have explicitly defined name. Method will overwrite entries in incomingnamesarray with explicit names found, if any, leaving other entries unmodified.- Overrides:
findEnumValuesin classAnnotationIntrospector- Parameters:
enumType- Type of EnumerationenumValues- Values of enumerationnames- Matching declared names of enumeration values (with indexes matchingenumValuesentries)- Returns:
- Array of names to use (possible
namespassed as argument)
-
findEnumValues
public String[] findEnumValues(MapperConfig<?> config, AnnotatedClass annotatedClass, Enum<?>[] enumValues, String[] names) Description copied from class:AnnotationIntrospectorFinds the explicitly defined name of the given set ofEnumvalues, if any. The method overwrites entries in the incomingnamesarray with the explicit names found, if any, leaving other entries unmodified.- Overrides:
findEnumValuesin classAnnotationIntrospector- Parameters:
config- the mapper configuration to useannotatedClass- the annotated class for which to find the explicit namesenumValues- the set ofEnumvalues to find the explicit names fornames- the matching declared names of enumeration values (with indexes matchingenumValuesentries)- Returns:
- an array of names to use (possibly
namespassed as argument) - Since:
- 2.16
- See Also:
-
findDeserializer
Description copied from class:AnnotationIntrospectorMethod for getting a deserializer definition on specified method or field. Type of definition is either instance (of typeJsonDeserializer) or Class (of typeClass&<JsonDeserializer>); type is returned, a runtime exception may be thrown by caller.- Overrides:
findDeserializerin classAnnotationIntrospector
-
findKeyDeserializer
Description copied from class:AnnotationIntrospectorMethod for getting a deserializer definition for keys of associatedMapproperty. Type of definition is either instance (of typeJsonDeserializer) or Class (of typeClass<JsonDeserializer>); if value of different type is returned, a runtime exception may be thrown by caller.- Overrides:
findKeyDeserializerin classAnnotationIntrospector
-
findContentDeserializer
Description copied from class:AnnotationIntrospectorMethod for getting a deserializer definition for content (values) of associatedCollection,arrayorMapproperty. Type of definition is either instance (of typeJsonDeserializer) or Class (of typeClass<JsonDeserializer>); if value of different type is returned, a runtime exception may be thrown by caller.- Overrides:
findContentDeserializerin classAnnotationIntrospector
-
_doFindDeserializationType
-
refineDeserializationType
public JavaType refineDeserializationType(MapperConfig<?> config, Annotated a, JavaType baseType) throws JsonMappingException Description copied from class:AnnotationIntrospectorMethod called to find out possible type refinements to use for deserialization.- Overrides:
refineDeserializationTypein classAnnotationIntrospector- Throws:
JsonMappingException
-
findNameForDeserialization
Description copied from class:AnnotationIntrospectorMethod 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 (possiblyPropertyName.USE_DEFAULT, which means "use default heuristics").- Overrides:
findNameForDeserializationin classAnnotationIntrospector- Parameters:
a- Annotated entity to check- Returns:
- Name to use if found;
nullif not.
-
findDeserializationConverter
Description copied from class:AnnotationIntrospectorMethod for findingConverterthat annotated entity (property or class) has indicated to be used as part of deserialization. If not null, either has to be actualConverterinstance, or class for such converter; and resulting converter will be used after Jackson has deserializer data into intermediate type (Converter input type), and Converter needs to convert this into its target type to be set as property value.This feature is typically used to convert intermediate Jackson types (that default deserializers can produce) into custom type instances.
Note also that this feature does not necessarily work well with polymorphic type handling, or object identity handling; if such features are needed an explicit deserializer is usually better way to handle deserialization.
- Overrides:
findDeserializationConverterin classAnnotationIntrospector- Parameters:
a- Annotated property (field, method) or class to check for annotations
-
findDeserializationContentConverter
Description copied from class:AnnotationIntrospectorMethod for findingConverterthat annotated property has indicated needs to be used for values of container type (this also means that method should only be called for properties of container types, List/Map/array properties).If not null, either has to be actual
Converterinstance, or class for such converter; and resulting converter will be used after Jackson has deserializer data into intermediate type (Converter input type), and Converter needs to convert this into its target type to be set as property value.Other notes are same as those for
AnnotationIntrospector.findDeserializationConverter(com.fasterxml.jackson.databind.introspect.Annotated)- Overrides:
findDeserializationContentConverterin classAnnotationIntrospector- Parameters:
a- Annotated property (field, method) to check.
-
isJAXBAnnotation
An annotation is handled if it's in the same package as @XmlElement, including subpackages.- Parameters:
ann- The annotation.- Returns:
- Whether the annotation is in the JAXB package.
-
getTypeFactory
-
_findContentAdapter
-
_propertyNameToString
-
_rawDeserializationType
-
_fullDeserializationType
-
_rawSerializationType
-
_fullSerializationType
-
_converter
-
_getTypeFromXmlElement
-
_okNameForGetter
-
_okNameForMutator
-
_stdManglePropertyName
-
_decapitalize
-