Class 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
    • Constructor Detail

      • AnnotatedMember

        protected AnnotatedMember​(AnnotationMap annotations)
    • Method Detail

      • getDeclaringClass

        public abstract java.lang.Class<?> getDeclaringClass()
      • getMember

        public abstract java.lang.reflect.Member getMember()
      • 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​(java.lang.Object pojo,
                                      java.lang.Object value)
                               throws java.lang.UnsupportedOperationException,
                                      java.lang.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:
        java.lang.UnsupportedOperationException
        java.lang.IllegalArgumentException
        Since:
        1.9