Class Annotated
- java.lang.Object
-
- com.fasterxml.jackson.databind.introspect.Annotated
-
- Direct Known Subclasses:
AnnotatedClass,AnnotatedMember
public abstract class Annotated extends Object
Shared base class used for anything on which annotations (included within aAnnotationMap).
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAnnotated()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract Iterable<Annotation>annotations()Deprecated.Since 2.9 should instead usegetAnnotated()abstract booleanequals(Object o)abstract AnnotatedElementgetAnnotated()Method that can be used to find actual JDK element that this instance represents.abstract <A extends Annotation>
AgetAnnotation(Class<A> acls)TypegetGenericType()Deprecated.Since 2.7 should instead usegetType().protected abstract intgetModifiers()abstract StringgetName()abstract Class<?>getRawType()"Raw" type (type-erased class) of the annotated element; definition of what exactly this means depends on sub-class.abstract JavaTypegetType()Full generic type of the annotated element; definition of what exactly this means depends on sub-class.JavaTypegetType(TypeBindings bogus)Deprecated.Since 2.7 UsegetType()instead.abstract booleanhasAnnotation(Class<?> acls)abstract inthashCode()abstract booleanhasOneOf(Class<? extends Annotation>[] annoClasses)booleanisPublic()abstract StringtoString()
-
-
-
Method Detail
-
getAnnotation
public abstract <A extends Annotation> A getAnnotation(Class<A> acls)
-
hasAnnotation
public abstract boolean hasAnnotation(Class<?> acls)
-
hasOneOf
public abstract boolean hasOneOf(Class<? extends Annotation>[] annoClasses)
- Since:
- 2.7
-
getAnnotated
public abstract AnnotatedElement getAnnotated()
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.
-
getModifiers
protected abstract int getModifiers()
-
isPublic
public boolean isPublic()
-
getName
public abstract String getName()
-
getType
public abstract JavaType getType()
Full generic type of the annotated element; definition of what exactly this means depends on sub-class.- Since:
- 2.7
-
getType
@Deprecated public final JavaType getType(TypeBindings bogus)
Deprecated.Since 2.7 UsegetType()instead. To be removed from 2.9
-
getGenericType
@Deprecated public Type getGenericType()
Deprecated.Since 2.7 should instead usegetType(). To be removed from 2.9JDK declared generic type of the annotated element; definition of what exactly this means depends on sub-class. Note that such type cannot be reliably resolved withoutTypeResolutionContext, and as a result use of this method was deprecated in Jackson 2.7: seegetType()for replacement.
-
getRawType
public abstract Class<?> getRawType()
"Raw" type (type-erased class) of the annotated element; definition of what exactly this means depends on sub-class.
-
annotations
@Deprecated public abstract Iterable<Annotation> annotations()
Deprecated.Since 2.9 should instead usegetAnnotated()Accessor that can be used to iterate over all the annotations associated with annotated component.- Since:
- 2.3
-
-