com.fasterxml.jackson.databind.introspect

## 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 a `AnnotationMap`).

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Annotated()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract Iterable<Annotation>` | `annotations()` Deprecated. Since 2.9 should instead use `getAnnotated()`
    `abstract boolean` | `equals(Object o)`
    `abstract AnnotatedElement` | `getAnnotated()` Method that can be used to find actual JDK element that this instance represents.
    `abstract <A extends Annotation> A` | `getAnnotation(Class<A> acls)`
    `protected abstract int` | `getModifiers()`
    `abstract String` | `getName()`
    `abstract 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(Class<?> acls)`
    `abstract int` | `hashCode()`
    `abstract boolean` | `hasOneOf(Class<? extends Annotation>[] annoClasses)`
    `boolean` | `isPublic()`
    `abstract String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Annotated

          protected Annotated()

  - ### 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

    - #### 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 use `getAnnotated()`
      Accessor that can be used to iterate over all the annotations associated with annotated component.
      Since:
        2.3

    - #### equals

          public abstract boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public abstract int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public abstract String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2008–2020 FasterXML. All rights reserved.