com.fasterxml.jackson.databind.introspect

## Class AnnotatedMember

- java.lang.Object
- - com.fasterxml.jackson.databind.introspect.Annotated
  - - com.fasterxml.jackson.databind.introspect.AnnotatedMember

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    AnnotatedField, AnnotatedParameter, AnnotatedWithParams

      public abstract class AnnotatedMember
      extends Annotated
      implements Serializable

  Intermediate base class for annotated entities that are members of a class; fields, methods and constructors. This is a superset of things that can represent logical properties as it contains constructors in addition to fields and methods.
  Author:
    tatu
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AnnotationMap` | `_annotations`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AnnotatedMember(AnnotationMap annotations)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addIfNotPresent(Annotation a)` Method called to augment annotations, by adding specified annotation if and only if it is not yet present in the annotation map we have.
    `void` | `addOrOverride(Annotation a)` Method called to override an annotation, usually due to a mix-in annotation masking or overriding an annotation 'real' constructor has.
    `Iterable<Annotation>` | `annotations()` Accessor that can be used to iterate over all the annotations associated with annotated component.
    `void` | `fixAccess()` Method that can be called to modify access rights, by calling `AccessibleObject.setAccessible(java.lang.reflect.AccessibleObject[], boolean)` on the underlying annotated element.
    `protected AnnotationMap` | `getAllAnnotations()` Internal helper method used to access annotation information; not exposed to developers since instances are mutable.
    `abstract Class<?>` | `getDeclaringClass()`
    `abstract Member` | `getMember()`
    `abstract Object` | `getValue(Object pojo)` Optional method that can be used to access the value of this member on given object, if this is a supported operation for member type.
    `abstract void` | `setValue(Object pojo, Object value)` Optional method that can be used to assign value of this member on given object, if this is a supported operation for member type.

    - ### Methods inherited from class com.fasterxml.jackson.databind.introspect.Annotated

      `getAnnotated, getAnnotation, getGenericType, getModifiers, getName, getRawType, getType, hasAnnotation, isPublic, withAnnotations, withFallBackAnnotationsFrom`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### _annotations

          protected final transient AnnotationMap _annotations

  - ### Constructor Detail

    - #### AnnotatedMember

          protected AnnotatedMember(AnnotationMap annotations)

  - ### Method Detail

    - #### getDeclaringClass

          public abstract Class<?> getDeclaringClass()

    - #### getMember

          public abstract Member getMember()

    - #### annotations

          public Iterable<Annotation> annotations()

      Description copied from class: `Annotated`
      Accessor that can be used to iterate over all the annotations associated with annotated component.
      Specified by:
        `annotations` in class `Annotated`

    - #### getAllAnnotations

          protected AnnotationMap getAllAnnotations()

      Description copied from class: `Annotated`
      Internal helper method used to access annotation information; not exposed to developers since instances are mutable.
      Specified by:
        `getAllAnnotations` in class `Annotated`

    - #### addOrOverride

          public final void addOrOverride(Annotation a)

      Method called to override an annotation, usually due to a mix-in annotation masking or overriding an annotation 'real' constructor has.

    - #### addIfNotPresent

          public final void addIfNotPresent(Annotation a)

      Method called to augment annotations, by adding specified annotation if and only if it is not yet present in the annotation map we have.

    - #### fixAccess

          public final void fixAccess()

      Method that can be called to modify access rights, by calling `AccessibleObject.setAccessible(java.lang.reflect.AccessibleObject[], boolean)` on the underlying annotated element.

    - #### setValue

          public abstract void setValue(Object pojo,
                      Object value)
                                 throws UnsupportedOperationException,
                                        IllegalArgumentException

      Optional method that can be used to assign value of this member on given object, if this is a supported operation for member type.

      This is implemented for fields and single-argument member methods; but not for constructor parameters or other types of methods (like static methods)

      Throws:
        `UnsupportedOperationException`
        `IllegalArgumentException`

    - #### getValue

          public abstract Object getValue(Object pojo)
                                   throws UnsupportedOperationException,
                                          IllegalArgumentException

      Optional method that can be used to access the value of this member on given object, if this is a supported operation for member type.

      This is implemented for fields and no-argument member methods; but not for constructor parameters or other types of methods (like static methods)

      Throws:
        `UnsupportedOperationException`
        `IllegalArgumentException`

Copyright © 2012-2013 FasterXML. All Rights Reserved.