Class AnnotatedClassResolver
- java.lang.Object
-
- com.fasterxml.jackson.databind.introspect.AnnotatedClassResolver
-
public class AnnotatedClassResolver extends java.lang.Object
Helper class that contains logic for resolving annotations to constructAnnotatedClass
instances.- Since:
- 2.9
-
-
Field Summary
Fields Modifier and Type Field Description private TypeBindings
_bindings
private java.lang.Class<?>
_class
private boolean
_collectAnnotations
private MapperConfig<?>
_config
private AnnotationIntrospector
_intr
private ClassIntrospector.MixInResolver
_mixInResolver
private java.lang.Class<?>
_primaryMixin
private JavaType
_type
private static java.lang.Class<?>
CLS_ENUM
private static java.lang.Class<?>
CLS_LIST
private static java.lang.Class<?>
CLS_MAP
private static java.lang.Class<?>
CLS_OBJECT
private static Annotations
NO_ANNOTATIONS
-
Constructor Summary
Constructors Constructor Description AnnotatedClassResolver(MapperConfig<?> config, JavaType type, ClassIntrospector.MixInResolver r)
AnnotatedClassResolver(MapperConfig<?> config, java.lang.Class<?> cls, ClassIntrospector.MixInResolver r)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private AnnotationCollector
_addAnnotationsIfNotPresent(AnnotationCollector c, java.lang.annotation.Annotation[] anns)
private AnnotationCollector
_addClassMixIns(AnnotationCollector annotations, java.lang.Class<?> target, java.lang.Class<?> mixin)
private AnnotationCollector
_addFromBundleIfNotPresent(AnnotationCollector c, java.lang.annotation.Annotation bundle)
private static void
_addSuperInterfaces(JavaType type, java.util.List<JavaType> result, boolean addClassItself)
private static void
_addSuperTypes(JavaType type, java.util.List<JavaType> result, boolean addClassItself)
private static boolean
_contains(java.util.List<JavaType> found, java.lang.Class<?> raw)
(package private) static AnnotatedClass
createArrayType(MapperConfig<?> config, java.lang.Class<?> raw)
Internal helper method used for resolving array types, unless they happen to have associated mix-in to apply.(package private) static AnnotatedClass
createPrimordial(java.lang.Class<?> raw)
Internal helper method used for resolving a small set of "primordial" types for which we do not accept any annotation information or overrides.static AnnotatedClass
resolve(MapperConfig<?> config, JavaType forType, ClassIntrospector.MixInResolver r)
private Annotations
resolveClassAnnotations(java.util.List<JavaType> superTypes)
Initialization method that will recursively collect Jackson annotations for this class and all super classes and interfaces.(package private) AnnotatedClass
resolveFully()
(package private) AnnotatedClass
resolveWithoutSuperTypes()
static AnnotatedClass
resolveWithoutSuperTypes(MapperConfig<?> config, JavaType forType, ClassIntrospector.MixInResolver r)
static AnnotatedClass
resolveWithoutSuperTypes(MapperConfig<?> config, java.lang.Class<?> forType)
static AnnotatedClass
resolveWithoutSuperTypes(MapperConfig<?> config, java.lang.Class<?> forType, ClassIntrospector.MixInResolver r)
private static boolean
skippableArray(MapperConfig<?> config, java.lang.Class<?> type)
-
-
-
Field Detail
-
NO_ANNOTATIONS
private static final Annotations NO_ANNOTATIONS
-
CLS_OBJECT
private static final java.lang.Class<?> CLS_OBJECT
-
CLS_ENUM
private static final java.lang.Class<?> CLS_ENUM
-
CLS_LIST
private static final java.lang.Class<?> CLS_LIST
-
CLS_MAP
private static final java.lang.Class<?> CLS_MAP
-
_config
private final MapperConfig<?> _config
-
_intr
private final AnnotationIntrospector _intr
-
_mixInResolver
private final ClassIntrospector.MixInResolver _mixInResolver
-
_bindings
private final TypeBindings _bindings
-
_type
private final JavaType _type
-
_class
private final java.lang.Class<?> _class
-
_primaryMixin
private final java.lang.Class<?> _primaryMixin
-
_collectAnnotations
private final boolean _collectAnnotations
- Since:
- 2.11
-
-
Constructor Detail
-
AnnotatedClassResolver
AnnotatedClassResolver(MapperConfig<?> config, JavaType type, ClassIntrospector.MixInResolver r)
-
AnnotatedClassResolver
AnnotatedClassResolver(MapperConfig<?> config, java.lang.Class<?> cls, ClassIntrospector.MixInResolver r)
-
-
Method Detail
-
resolve
public static AnnotatedClass resolve(MapperConfig<?> config, JavaType forType, ClassIntrospector.MixInResolver r)
-
resolveWithoutSuperTypes
public static AnnotatedClass resolveWithoutSuperTypes(MapperConfig<?> config, java.lang.Class<?> forType)
-
resolveWithoutSuperTypes
public static AnnotatedClass resolveWithoutSuperTypes(MapperConfig<?> config, JavaType forType, ClassIntrospector.MixInResolver r)
-
resolveWithoutSuperTypes
public static AnnotatedClass resolveWithoutSuperTypes(MapperConfig<?> config, java.lang.Class<?> forType, ClassIntrospector.MixInResolver r)
-
skippableArray
private static boolean skippableArray(MapperConfig<?> config, java.lang.Class<?> type)
-
createPrimordial
static AnnotatedClass createPrimordial(java.lang.Class<?> raw)
Internal helper method used for resolving a small set of "primordial" types for which we do not accept any annotation information or overrides.
-
createArrayType
static AnnotatedClass createArrayType(MapperConfig<?> config, java.lang.Class<?> raw)
Internal helper method used for resolving array types, unless they happen to have associated mix-in to apply.
-
resolveFully
AnnotatedClass resolveFully()
-
resolveWithoutSuperTypes
AnnotatedClass resolveWithoutSuperTypes()
-
_addSuperTypes
private static void _addSuperTypes(JavaType type, java.util.List<JavaType> result, boolean addClassItself)
-
_addSuperInterfaces
private static void _addSuperInterfaces(JavaType type, java.util.List<JavaType> result, boolean addClassItself)
-
_contains
private static boolean _contains(java.util.List<JavaType> found, java.lang.Class<?> raw)
-
resolveClassAnnotations
private Annotations resolveClassAnnotations(java.util.List<JavaType> superTypes)
Initialization method that will recursively collect Jackson annotations for this class and all super classes and interfaces.
-
_addClassMixIns
private AnnotationCollector _addClassMixIns(AnnotationCollector annotations, java.lang.Class<?> target, java.lang.Class<?> mixin)
-
_addAnnotationsIfNotPresent
private AnnotationCollector _addAnnotationsIfNotPresent(AnnotationCollector c, java.lang.annotation.Annotation[] anns)
-
_addFromBundleIfNotPresent
private AnnotationCollector _addFromBundleIfNotPresent(AnnotationCollector c, java.lang.annotation.Annotation bundle)
-
-