Class AnnotatedMember
- java.lang.Object
-
- org.codehaus.jackson.map.introspect.Annotated
-
- org.codehaus.jackson.map.introspect.AnnotatedMember
-
- Direct Known Subclasses:
AnnotatedField
,AnnotatedParameter
,AnnotatedWithParams
public abstract class AnnotatedMember extends Annotated
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.- Since:
- 1.5
- Author:
- tatu
-
-
Field Summary
Fields Modifier and Type Field Description protected AnnotationMap
_annotations
-
Constructor Summary
Constructors Modifier Constructor Description protected
AnnotatedMember(AnnotationMap annotations)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
fixAccess()
Method that can be called to modify access rights, by callingAccessibleObject.setAccessible(java.lang.reflect.AccessibleObject[], boolean)
on the underlying annotated element.protected AnnotationMap
getAllAnnotations()
abstract Class<?>
getDeclaringClass()
abstract Member
getMember()
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 org.codehaus.jackson.map.introspect.Annotated
getAnnotated, getAnnotation, getGenericType, getModifiers, getName, getRawType, getType, hasAnnotation, isPublic, withAnnotations, withFallBackAnnotationsFrom
-
-
-
-
Field Detail
-
_annotations
protected final AnnotationMap _annotations
-
-
Constructor Detail
-
AnnotatedMember
protected AnnotatedMember(AnnotationMap annotations)
-
-
Method Detail
-
getDeclaringClass
public abstract Class<?> getDeclaringClass()
-
getMember
public abstract Member getMember()
-
getAllAnnotations
protected AnnotationMap getAllAnnotations()
- Specified by:
getAllAnnotations
in classAnnotated
-
fixAccess
public final void fixAccess()
Method that can be called to modify access rights, by callingAccessibleObject.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 fiedlds and single-argument methods; but not for constructor parameters or other types of methods.
- Throws:
UnsupportedOperationException
IllegalArgumentException
- Since:
- 1.9
-
-