Class AnnotationMemberValue


  • public class AnnotationMemberValue
    extends MemberValue
    Nested annotation.
    • Constructor Detail

      • AnnotationMemberValue

        public AnnotationMemberValue​(ConstPool cp)
        Constructs an annotation member. The initial value is not specified.
      • AnnotationMemberValue

        public AnnotationMemberValue​(Annotation a,
                                     ConstPool cp)
        Constructs an annotation member. The initial value is specified by the first parameter.
    • Method Detail

      • getValue

        java.lang.Object getValue​(java.lang.ClassLoader cl,
                                  ClassPool cp,
                                  java.lang.reflect.Method m)
                           throws java.lang.ClassNotFoundException
        Description copied from class: MemberValue
        Returns the value. If the value type is a primitive type, the returned value is boxed.
        Specified by:
        getValue in class MemberValue
        Throws:
        java.lang.ClassNotFoundException
      • getType

        java.lang.Class getType​(java.lang.ClassLoader cl)
                         throws java.lang.ClassNotFoundException
        Specified by:
        getType in class MemberValue
        Throws:
        java.lang.ClassNotFoundException
      • getValue

        public Annotation getValue()
        Obtains the value.
      • setValue

        public void setValue​(Annotation newValue)
        Sets the value of this member.
      • toString

        public java.lang.String toString()
        Obtains the string representation of this object.
        Overrides:
        toString in class java.lang.Object
      • write

        public void write​(AnnotationsWriter writer)
                   throws java.io.IOException
        Writes the value.
        Specified by:
        write in class MemberValue
        Throws:
        java.io.IOException