Class Annotated
- java.lang.Object
-
- com.fasterxml.jackson.databind.introspect.Annotated
-
- Direct Known Subclasses:
AnnotatedClass
,AnnotatedMember
public abstract class Annotated extends java.lang.Object
Shared base class used for anything on which annotations (included within aAnnotationMap
).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract java.lang.Iterable<java.lang.annotation.Annotation>
annotations()
Deprecated.Since 2.9 should instead usegetAnnotated()
abstract boolean
equals(java.lang.Object o)
abstract java.lang.reflect.AnnotatedElement
getAnnotated()
Method that can be used to find actual JDK element that this instance represents.abstract <A extends java.lang.annotation.Annotation>
AgetAnnotation(java.lang.Class<A> acls)
abstract java.lang.String
getName()
abstract java.lang.Class<?>
getRawType()
"Raw" type (type-erased class) of the annotated element; definition of what exactly this means depends on sub-class.abstract JavaType
getType()
Full generic type of the annotated element; definition of what exactly this means depends on sub-class.abstract boolean
hasAnnotation(java.lang.Class<?> acls)
abstract int
hashCode()
abstract boolean
hasOneOf(java.lang.Class<? extends java.lang.annotation.Annotation>[] annoClasses)
boolean
isPublic()
abstract java.lang.String
toString()
-
-
-
Method Detail
-
getAnnotation
public abstract <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> acls)
-
hasAnnotation
public abstract boolean hasAnnotation(java.lang.Class<?> acls)
-
hasOneOf
public abstract boolean hasOneOf(java.lang.Class<? extends java.lang.annotation.Annotation>[] annoClasses)
- Since:
- 2.7
-
getAnnotated
public abstract java.lang.reflect.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.
-
isPublic
public boolean isPublic()
-
getName
public abstract java.lang.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
-
getRawType
public abstract java.lang.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 java.lang.Iterable<java.lang.annotation.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
-
equals
public abstract boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public abstract int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public abstract java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-