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 classAnnotatedClass.Creators-
Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.introspect.TypeResolutionContext
TypeResolutionContext.Basic, TypeResolutionContext.Empty
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Iterable<java.lang.annotation.Annotation>annotations()Deprecated.static AnnotatedClassconstruct(JavaType type, MapperConfig<?> config)Deprecated.Since 2.9, use methods inAnnotatedClassResolverinstead.static AnnotatedClassconstruct(JavaType type, MapperConfig<?> config, ClassIntrospector.MixInResolver mir)Deprecated.Since 2.9, use methods inAnnotatedClassResolverinstead.static AnnotatedClassconstructWithoutSuperTypes(java.lang.Class<?> raw, MapperConfig<?> config)Deprecated.Since 2.9, use methods inAnnotatedClassResolverinstead.static AnnotatedClassconstructWithoutSuperTypes(java.lang.Class<?> raw, MapperConfig<?> config, ClassIntrospector.MixInResolver mir)Deprecated.Since 2.9, use methods inAnnotatedClassResolverinstead.booleanequals(java.lang.Object o)java.lang.Iterable<AnnotatedField>fields()AnnotatedMethodfindMethod(java.lang.String name, java.lang.Class<?>[] paramTypes)java.lang.Class<?>getAnnotated()Method that can be used to find actual JDK element that this instance represents.<A extends java.lang.annotation.Annotation>
AgetAnnotation(java.lang.Class<A> acls)AnnotationsgetAnnotations()java.util.List<AnnotatedConstructor>getConstructors()AnnotatedConstructorgetDefaultConstructor()java.util.List<AnnotatedMethod>getFactoryMethods()intgetFieldCount()intgetMemberMethodCount()intgetModifiers()java.lang.StringgetName()java.lang.Class<?>getRawType()"Raw" type (type-erased class) of the annotated element; definition of what exactly this means depends on sub-class.java.util.List<AnnotatedMethod>getStaticMethods()Deprecated.Since 2.9; usegetFactoryMethods()instead.JavaTypegetType()Full generic type of the annotated element; definition of what exactly this means depends on sub-class.booleanhasAnnotation(java.lang.Class<?> acls)booleanhasAnnotations()inthashCode()booleanhasOneOf(java.lang.Class<? extends java.lang.annotation.Annotation>[] annoClasses)booleanisNonStaticInnerClass()java.lang.Iterable<AnnotatedMethod>memberMethods()JavaTyperesolveType(java.lang.reflect.Type type)java.lang.StringtoString()
-
-
-
Method Detail
-
construct
@Deprecated public static AnnotatedClass construct(JavaType type, MapperConfig<?> config)
Deprecated.Since 2.9, use methods inAnnotatedClassResolverinstead.
-
construct
@Deprecated public static AnnotatedClass construct(JavaType type, MapperConfig<?> config, ClassIntrospector.MixInResolver mir)
Deprecated.Since 2.9, use methods inAnnotatedClassResolverinstead.
-
constructWithoutSuperTypes
@Deprecated public static AnnotatedClass constructWithoutSuperTypes(java.lang.Class<?> raw, MapperConfig<?> config)
Deprecated.Since 2.9, use methods inAnnotatedClassResolverinstead.Method similar toconstruct(com.fasterxml.jackson.databind.JavaType, com.fasterxml.jackson.databind.cfg.MapperConfig<?>), but that will NOT include information from supertypes; only class itself and any direct mix-ins it may have.
-
constructWithoutSuperTypes
@Deprecated public static AnnotatedClass constructWithoutSuperTypes(java.lang.Class<?> raw, MapperConfig<?> config, ClassIntrospector.MixInResolver mir)
Deprecated.Since 2.9, use methods inAnnotatedClassResolverinstead.
-
resolveType
public JavaType resolveType(java.lang.reflect.Type type)
- Specified by:
resolveTypein interfaceTypeResolutionContext
-
getAnnotated
public java.lang.Class<?> getAnnotated()
Description copied from class:AnnotatedMethod 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:
getAnnotatedin classAnnotated
-
getModifiers
public int getModifiers()
-
getAnnotation
public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> acls)
- Specified by:
getAnnotationin classAnnotated
-
hasAnnotation
public boolean hasAnnotation(java.lang.Class<?> acls)
- Specified by:
hasAnnotationin classAnnotated
-
hasOneOf
public boolean hasOneOf(java.lang.Class<? extends java.lang.annotation.Annotation>[] annoClasses)
-
getRawType
public java.lang.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:
getRawTypein classAnnotated
-
annotations
@Deprecated public java.lang.Iterable<java.lang.annotation.Annotation> annotations()
Deprecated.Description copied from class:AnnotatedAccessor that can be used to iterate over all the annotations associated with annotated component.- Specified by:
annotationsin classAnnotated
-
getType
public JavaType getType()
Description copied from class:AnnotatedFull 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 java.util.List<AnnotatedConstructor> getConstructors()
-
getFactoryMethods
public java.util.List<AnnotatedMethod> getFactoryMethods()
- Since:
- 2.9
-
getStaticMethods
@Deprecated public java.util.List<AnnotatedMethod> getStaticMethods()
Deprecated.Since 2.9; usegetFactoryMethods()instead.
-
memberMethods
public java.lang.Iterable<AnnotatedMethod> memberMethods()
-
getMemberMethodCount
public int getMemberMethodCount()
-
findMethod
public AnnotatedMethod findMethod(java.lang.String name, java.lang.Class<?>[] paramTypes)
-
getFieldCount
public int getFieldCount()
-
fields
public java.lang.Iterable<AnnotatedField> fields()
-
isNonStaticInnerClass
public boolean isNonStaticInnerClass()
- Since:
- 2.9
-
-