Top Fields Constructors Methods
tools.jackson.databind.introspect

public Class BasicClassIntrospector

extends ClassIntrospector
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.util.Collection, .HashMap, .Map, .Objects, tools.jackson.databind.*, tools.jackson.databind.cfg.MapperConfig, tools.jackson.databind.util.ClassUtil

Field Summary

Modifier and TypeField and Description
protected final MapperConfig<?>
protected final MixInResolver
protected HashMap<JavaType, BasicBeanDescription>
_resolvedDeserBeanDescs

Reuse full bean descriptions for serialization during a single operation

protected HashMap<JavaType, AnnotatedClass>
_resolvedFullAnnotations

Reuse fully-resolved annotations during a single operation

protected HashMap<JavaType, BasicBeanDescription>
_resolvedSerBeanDescs

Reuse full bean descriptions for serialization during a single operation

private static final AnnotatedClass
private static final Class<?>
private static final Class<?>
private static final Class<?>
private static final Class<?>
private static final AnnotatedClass
private static final AnnotatedClass
private static final AnnotatedClass
private static final AnnotatedClass
private static final long
private static final AnnotatedClass

Constructor Summary

AccessConstructor and Description
public
protected

Method Summary

Modifier and TypeMethod and Description
protected BasicBeanDescription
protected AnnotatedClass
_findStdTypeDef(JavaType type)

Method called to see if type is one of core JDK types that we have cached for efficiency.

protected BasicBeanDescription
private boolean
_isStdJDKCollection(JavaType type)

Helper method used to decide whether we can omit introspection for members (methods, fields, constructors); we may do so for a limited number of container types JDK provides.

protected AnnotatedClass
protected AnnotatedClass
protected POJOPropertiesCollector
collectProperties(JavaType type, AnnotatedClass classDef, boolean forSerialization, String mutatorPrefix)

protected POJOPropertiesCollector
collectPropertiesWithBuilder(JavaType type, AnnotatedClass builderClassDef, BeanDescription valueTypeDesc, boolean forSerialization)

protected POJOPropertiesCollector
constructPropertyCollector(JavaType type, AnnotatedClass classDef, boolean forSerialization, AccessorNamingStrategy accNaming)

Overridable method called for creating POJOPropertiesCollector instance to use; override is needed if a custom sub-class is to be used.

public BasicClassIntrospector
forMapper()

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.forMapper.

Method called to create an instance to be exclusive used by specified mapper.

public BasicClassIntrospector
forOperation(MapperConfig<?> config)

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.forOperation.

Method called to further create an instance to be used for a single operation (read or write, typically matching ObjectMapper readValue() or writeValue()).

public AnnotatedClass
introspectClassAnnotations(JavaType type)

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.introspectClassAnnotations.

Factory method that introspects a AnnotatedClass that only has information regarding annotations class itself (or its supertypes) has, but nothing on methods or constructors.

public AnnotatedClass
introspectDirectClassAnnotations(JavaType type)

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.introspectDirectClassAnnotations.

Factory method that introspects a AnnotatedClass that only has information regarding annotations class itself has (but NOT including its supertypes), but nothing on methods or constructors.

public BasicBeanDescription
introspectForCreation(JavaType type, AnnotatedClass classDef)

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.introspectForCreation.

Factory method that introspects a BeanDescription that has information necessary for creating instances of given class ("creator"), as well as class annotations, but no information on member methods

public BasicBeanDescription
introspectForDeserialization(JavaType type, AnnotatedClass classDef)

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.introspectForDeserialization.

Factory method that introspects a BeanDescription that has all information needed for deserialization purposes.

public BasicBeanDescription
introspectForDeserializationWithBuilder(JavaType type, BeanDescription valueTypeDesc)

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.introspectForDeserializationWithBuilder.

Factory method that introspects a BeanDescription that has all information needed for constructing deserializers that use intermediate Builder objects.

public BasicBeanDescription
introspectForSerialization(JavaType type, AnnotatedClass classDef)

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.introspectForSerialization.

Factory method that introspects a BeanDescription that has all information needed for serialization purposes.

Field Detail

_configback to summary
protected final MapperConfig<?> _config
_mixInResolverback to summary
protected final MixInResolver _mixInResolver
_resolvedDeserBeanDescsback to summary
protected HashMap<JavaType, BasicBeanDescription> _resolvedDeserBeanDescs

Reuse full bean descriptions for serialization during a single operation

_resolvedFullAnnotationsback to summary
protected HashMap<JavaType, AnnotatedClass> _resolvedFullAnnotations

Reuse fully-resolved annotations during a single operation

_resolvedSerBeanDescsback to summary
protected HashMap<JavaType, BasicBeanDescription> _resolvedSerBeanDescs

Reuse full bean descriptions for serialization during a single operation

BOOLEAN_ACback to summary
private static final AnnotatedClass BOOLEAN_AC
CLS_JSON_NODEback to summary
private static final Class<?> CLS_JSON_NODE
CLS_NUMBERback to summary
private static final Class<?> CLS_NUMBER
CLS_OBJECTback to summary
private static final Class<?> CLS_OBJECT
CLS_STRINGback to summary
private static final Class<?> CLS_STRING
INT_ACback to summary
private static final AnnotatedClass INT_AC
LONG_ACback to summary
private static final AnnotatedClass LONG_AC
NUMBER_ACback to summary
private static final AnnotatedClass NUMBER_AC
OBJECT_ACback to summary
private static final AnnotatedClass OBJECT_AC
serialVersionUIDback to summary
private static final long serialVersionUID
STRING_ACback to summary
private static final AnnotatedClass STRING_AC

Constructor Detail

BasicClassIntrospectorback to summary
public BasicClassIntrospector()
BasicClassIntrospectorback to summary
protected BasicClassIntrospector(MapperConfig<?> config)

Method Detail

_findStdJdkCollectionDescback to summary
protected BasicBeanDescription _findStdJdkCollectionDesc(JavaType type)
_findStdTypeDefback to summary
protected AnnotatedClass _findStdTypeDef(JavaType type)

Method called to see if type is one of core JDK types that we have cached for efficiency.

_findStdTypeDescback to summary
protected BasicBeanDescription _findStdTypeDesc(JavaType type)
_isStdJDKCollectionback to summary
private boolean _isStdJDKCollection(JavaType type)

Helper method used to decide whether we can omit introspection for members (methods, fields, constructors); we may do so for a limited number of container types JDK provides.

_resolveAnnotatedClassback to summary
protected AnnotatedClass _resolveAnnotatedClass(JavaType type)
_resolveAnnotatedWithoutSuperTypesback to summary
protected AnnotatedClass _resolveAnnotatedWithoutSuperTypes(JavaType type)
collectPropertiesback to summary
protected POJOPropertiesCollector collectProperties(JavaType type, AnnotatedClass classDef, boolean forSerialization, String mutatorPrefix)
collectPropertiesWithBuilderback to summary
protected POJOPropertiesCollector collectPropertiesWithBuilder(JavaType type, AnnotatedClass builderClassDef, BeanDescription valueTypeDesc, boolean forSerialization)
constructPropertyCollectorback to summary
protected POJOPropertiesCollector constructPropertyCollector(JavaType type, AnnotatedClass classDef, boolean forSerialization, AccessorNamingStrategy accNaming)

Overridable method called for creating POJOPropertiesCollector instance to use; override is needed if a custom sub-class is to be used.

forMapperback to summary
public BasicClassIntrospector forMapper()

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.forMapper.

Doc from tools.jackson.databind.introspect.ClassIntrospector.forMapper.

Method called to create an instance to be exclusive used by specified mapper. Needed to ensure that no sharing through cache occurs.

Basic implementation just returns instance itself.

Annotations
@Override
forOperationback to summary
public BasicClassIntrospector forOperation(MapperConfig<?> config)

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.forOperation.

Doc from tools.jackson.databind.introspect.ClassIntrospector.forOperation.

Method called to further create an instance to be used for a single operation (read or write, typically matching ObjectMapper readValue() or writeValue()).

Annotations
@Override
introspectClassAnnotationsback to summary
public AnnotatedClass introspectClassAnnotations(JavaType type)

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.introspectClassAnnotations.

Doc from tools.jackson.databind.introspect.ClassIntrospector.introspectClassAnnotations.

Factory method that introspects a AnnotatedClass that only has information regarding annotations class itself (or its supertypes) has, but nothing on methods or constructors.

Annotations
@Override
introspectDirectClassAnnotationsback to summary
public AnnotatedClass introspectDirectClassAnnotations(JavaType type)

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.introspectDirectClassAnnotations.

Doc from tools.jackson.databind.introspect.ClassIntrospector.introspectDirectClassAnnotations.

Factory method that introspects a AnnotatedClass that only has information regarding annotations class itself has (but NOT including its supertypes), but nothing on methods or constructors.

Annotations
@Override
introspectForCreationback to summary
public BasicBeanDescription introspectForCreation(JavaType type, AnnotatedClass classDef)

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.introspectForCreation.

Doc from tools.jackson.databind.introspect.ClassIntrospector.introspectForCreation.

Factory method that introspects a BeanDescription that has information necessary for creating instances of given class ("creator"), as well as class annotations, but no information on member methods

Annotations
@Override
introspectForDeserializationback to summary
public BasicBeanDescription introspectForDeserialization(JavaType type, AnnotatedClass classDef)

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.introspectForDeserialization.

Doc from tools.jackson.databind.introspect.ClassIntrospector.introspectForDeserialization.

Factory method that introspects a BeanDescription that has all information needed for deserialization purposes.

Annotations
@Override
introspectForDeserializationWithBuilderback to summary
public BasicBeanDescription introspectForDeserializationWithBuilder(JavaType type, BeanDescription valueTypeDesc)

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.introspectForDeserializationWithBuilder.

Doc from tools.jackson.databind.introspect.ClassIntrospector.introspectForDeserializationWithBuilder.

Factory method that introspects a BeanDescription that has all information needed for constructing deserializers that use intermediate Builder objects.

Annotations
@Override
introspectForSerializationback to summary
public BasicBeanDescription introspectForSerialization(JavaType type, AnnotatedClass classDef)

Implements abstract tools.jackson.databind.introspect.ClassIntrospector.introspectForSerialization.

Doc from tools.jackson.databind.introspect.ClassIntrospector.introspectForSerialization.

Factory method that introspects a BeanDescription that has all information needed for serialization purposes.

Annotations
@Override