Class AnnotatedClass
- java.lang.Object
-
- com.fasterxml.jackson.databind.introspect.Annotated
-
- com.fasterxml.jackson.databind.introspect.AnnotatedClass
-
- All Implemented Interfaces:
TypeResolutionContext
public final class AnnotatedClass extends Annotated implements TypeResolutionContext
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AnnotatedClass.Creators
-
Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.introspect.TypeResolutionContext
TypeResolutionContext.Basic
-
-
Field Summary
Fields Modifier and Type Field Description protected AnnotationIntrospector
_annotationIntrospector
Filter used to determine which annotations to gather; used to optimize things so that unnecessary annotations are ignored.protected TypeBindings
_bindings
Type bindings to use for members of_class
.protected Class<?>
_class
Class for which annotations apply, and that owns other components (constructors, methods)protected Annotations
_classAnnotations
Combined list of Jackson annotations that the class has, including inheritable ones from super classes and interfacesprotected AnnotatedClass.Creators
_creators
protected List<AnnotatedField>
_fields
Member fields of interest: ones that are either public, or have at least one annotation.protected AnnotatedMethodMap
_memberMethods
Member methods of interest; for now ones with 0 or 1 arguments (just optimization, since others won't be used now)protected ClassIntrospector.MixInResolver
_mixInResolver
Object that knows mapping of mix-in classes (ones that contain annotations to add) with their target classes (ones that get these additional annotations "mixed in").protected Boolean
_nonStaticInnerClass
Lazily determined property to see if this is a non-static inner class.protected Class<?>
_primaryMixIn
Primary mix-in class; one to use for the annotated class itself.protected List<JavaType>
_superTypes
Ordered set of super classes and interfaces of the class itself: included in order of precedenceprotected JavaType
_type
protected TypeFactory
_typeFactory
-
Method Summary
-
Methods inherited from class com.fasterxml.jackson.databind.introspect.Annotated
getGenericType, getType, isPublic
-
-
-
-
Field Detail
-
_type
protected final JavaType _type
- Since:
- 2.7
-
_class
protected final Class<?> _class
Class for which annotations apply, and that owns other components (constructors, methods)
-
_bindings
protected final TypeBindings _bindings
Type bindings to use for members of_class
.- Since:
- 2.7
-
_superTypes
protected final List<JavaType> _superTypes
Ordered set of super classes and interfaces of the class itself: included in order of precedence
-
_annotationIntrospector
protected final AnnotationIntrospector _annotationIntrospector
Filter used to determine which annotations to gather; used to optimize things so that unnecessary annotations are ignored.
-
_typeFactory
protected final TypeFactory _typeFactory
- Since:
- 2.7
-
_mixInResolver
protected final ClassIntrospector.MixInResolver _mixInResolver
Object that knows mapping of mix-in classes (ones that contain annotations to add) with their target classes (ones that get these additional annotations "mixed in").
-
_primaryMixIn
protected final Class<?> _primaryMixIn
Primary mix-in class; one to use for the annotated class itself. Can be null.
-
_classAnnotations
protected final Annotations _classAnnotations
Combined list of Jackson annotations that the class has, including inheritable ones from super classes and interfaces
-
_creators
protected AnnotatedClass.Creators _creators
- Since:
- 2.9
-
_memberMethods
protected AnnotatedMethodMap _memberMethods
Member methods of interest; for now ones with 0 or 1 arguments (just optimization, since others won't be used now)
-
_fields
protected List<AnnotatedField> _fields
Member fields of interest: ones that are either public, or have at least one annotation.
-
_nonStaticInnerClass
protected transient Boolean _nonStaticInnerClass
Lazily determined property to see if this is a non-static inner class.- Since:
- 2.8.7
-
-
Method Detail
-
construct
@Deprecated public static AnnotatedClass construct(JavaType type, MapperConfig<?> config)
Deprecated.Since 2.9, use methods inAnnotatedClassResolver
instead.
-
construct
@Deprecated public static AnnotatedClass construct(JavaType type, MapperConfig<?> config, ClassIntrospector.MixInResolver mir)
Deprecated.Since 2.9, use methods inAnnotatedClassResolver
instead.
-
constructWithoutSuperTypes
@Deprecated public static AnnotatedClass constructWithoutSuperTypes(Class<?> raw, MapperConfig<?> config)
Deprecated.Since 2.9, use methods inAnnotatedClassResolver
instead.
-
constructWithoutSuperTypes
@Deprecated public static AnnotatedClass constructWithoutSuperTypes(Class<?> raw, MapperConfig<?> config, ClassIntrospector.MixInResolver mir)
Deprecated.Since 2.9, use methods inAnnotatedClassResolver
instead.
-
resolveType
public JavaType resolveType(Type type)
- Specified by:
resolveType
in interfaceTypeResolutionContext
-
getAnnotated
public Class<?> getAnnotated()
Description copied from class:Annotated
Method that can be used to find actual JDK element that this instance represents. It is non-null, except for method/constructor parameters which do not have a JDK counterpart.- Specified by:
getAnnotated
in classAnnotated
-
getModifiers
public int getModifiers()
- Specified by:
getModifiers
in classAnnotated
-
getAnnotation
public <A extends Annotation> A getAnnotation(Class<A> acls)
- Specified by:
getAnnotation
in classAnnotated
-
hasAnnotation
public boolean hasAnnotation(Class<?> acls)
- Specified by:
hasAnnotation
in classAnnotated
-
hasOneOf
public boolean hasOneOf(Class<? extends Annotation>[] annoClasses)
-
getRawType
public Class<?> getRawType()
Description copied from class:Annotated
"Raw" type (type-erased class) of the annotated element; definition of what exactly this means depends on sub-class.- Specified by:
getRawType
in classAnnotated
-
annotations
@Deprecated public Iterable<Annotation> annotations()
Deprecated.Description copied from class:Annotated
Accessor that can be used to iterate over all the annotations associated with annotated component.- Specified by:
annotations
in classAnnotated
-
getType
public JavaType getType()
Description copied from class:Annotated
Full generic type of the annotated element; definition of what exactly this means depends on sub-class.
-
getAnnotations
public Annotations getAnnotations()
-
hasAnnotations
public boolean hasAnnotations()
-
getDefaultConstructor
public AnnotatedConstructor getDefaultConstructor()
-
getConstructors
public List<AnnotatedConstructor> getConstructors()
-
getFactoryMethods
public List<AnnotatedMethod> getFactoryMethods()
- Since:
- 2.9
-
getStaticMethods
@Deprecated public List<AnnotatedMethod> getStaticMethods()
Deprecated.Since 2.9; usegetFactoryMethods()
instead.
-
memberMethods
public Iterable<AnnotatedMethod> memberMethods()
-
getMemberMethodCount
public int getMemberMethodCount()
-
findMethod
public AnnotatedMethod findMethod(String name, Class<?>[] paramTypes)
-
getFieldCount
public int getFieldCount()
-
fields
public Iterable<AnnotatedField> fields()
-
isNonStaticInnerClass
public boolean isNonStaticInnerClass()
- Since:
- 2.9
-
-