Top Description Fields Constructors Methods
com.fasterxml.jackson.databind.introspect

public abstract Class AnnotatedMember

extends Annotated
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
com.fasterxml.jackson.databind.introspect.AnnotatedParameter, com.fasterxml.jackson.databind.introspect.VirtualAnnotatedMember, com.fasterxml.jackson.databind.introspect.AnnotatedWithParams, com.fasterxml.jackson.databind.introspect.AnnotatedField
Imports
java.lang.annotation.Annotation, java.lang.reflect.Member, java.util.Collections, com.fasterxml.jackson.databind.util.ClassUtil

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.

Field Summary

Modifier and TypeField and Description
protected final transient AnnotationMap
protected final transient TypeResolutionContext
_typeContext

Context object needed for resolving generic type associated with this member (method parameter or return value, or field type).

private static final long

Constructor Summary

AccessConstructor and Description
protected
protected
AnnotatedMember(AnnotatedMember base)

Copy-constructor.

Method Summary

Modifier and TypeMethod and Description
public Iterable<Annotation>
annotations()

Implements abstract com.fasterxml.jackson.databind.introspect.Annotated.annotations.

Deprecated

Accessor that can be used to iterate over all the annotations associated with annotated component.

public final void
fixAccess(boolean force)

Method that can be called to modify access rights, by calling java.lang.reflect.AccessibleObject#setAccessible on the underlying annotated element.

public AnnotationMap
getAllAnnotations()

Note

promoted in 2.9 from `Annotated` up

public final <A extends Annotation> A
public abstract Class<?>
getDeclaringClass()

Actual physical class in which this member was declared.

public String
public abstract Member
public TypeResolutionContext
getTypeContext()
Deprecated Since 2.9

Accessor for TypeResolutionContext that is used for resolving full generic type of this member.

public 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.

public final boolean
public boolean
public 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.

public abstract Annotated
withAnnotations(AnnotationMap fallback)

Fluent factory method that will construct a new instance that uses specified instance annotations instead of currently configured ones.

Inherited from com.fasterxml.jackson.databind.introspect.Annotated:
equalsgetAnnotatedgetModifiersgetNamegetRawTypegetTypehashCodeisPublictoString

Field Detail

_annotationsback to summary
protected final transient AnnotationMap _annotations
_typeContextback to summary
protected final transient TypeResolutionContext _typeContext

Context object needed for resolving generic type associated with this member (method parameter or return value, or field type).

Since
2.7
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

AnnotatedMemberback to summary
protected AnnotatedMember(TypeResolutionContext ctxt, AnnotationMap annotations)
AnnotatedMemberback to summary
protected AnnotatedMember(AnnotatedMember base)

Copy-constructor.

Since
2.5

Method Detail

annotationsback to summary
public Iterable<Annotation> annotations()

Implements abstract com.fasterxml.jackson.databind.introspect.Annotated.annotations.

Doc from com.fasterxml.jackson.databind.introspect.Annotated.annotations.

Deprecated

Accessor that can be used to iterate over all the annotations associated with annotated component.

Annotations
@Override
@Deprecated
fixAccessback to summary
public final void fixAccess(boolean force)

Method that can be called to modify access rights, by calling java.lang.reflect.AccessibleObject#setAccessible on the underlying annotated element.

Note that caller should verify that com.fasterxml.jackson.databind.MapperFeature#CAN_OVERRIDE_ACCESS_MODIFIERS is enabled before calling this method; as well as pass force flag appropriately.

Since
2.7
getAllAnnotationsback to summary
public AnnotationMap getAllAnnotations()

Note

promoted in 2.9 from `Annotated` up

getAnnotationback to summary
public final <A extends Annotation> A getAnnotation(Class<A> acls)

Implements abstract com.fasterxml.jackson.databind.introspect.Annotated.getAnnotation.

Annotations
@Override
getDeclaringClassback to summary
public abstract Class<?> getDeclaringClass()

Actual physical class in which this member was declared.

getFullNameback to summary
public String getFullName()
getMemberback to summary
public abstract Member getMember()
getTypeContextback to summary
public TypeResolutionContext getTypeContext()

Deprecated

Since 2.9

Accessor for TypeResolutionContext that is used for resolving full generic type of this member.

Annotations
@Deprecated
Since
2.7
getValueback to summary
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)

hasAnnotationback to summary
public final boolean hasAnnotation(Class<?> acls)

Implements abstract com.fasterxml.jackson.databind.introspect.Annotated.hasAnnotation.

Annotations
@Override
hasOneOfback to summary
public boolean hasOneOf(Class<? extends Annotation>[] annoClasses)

Implements abstract com.fasterxml.jackson.databind.introspect.Annotated.hasOneOf.

Annotations
@Override
setValueback to summary
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)

withAnnotationsback to summary
public abstract Annotated withAnnotations(AnnotationMap fallback)

Fluent factory method that will construct a new instance that uses specified instance annotations instead of currently configured ones.

Since
2.9 (promoted from `Annotated`)