Class AnnotationsReader.AnnotationAttribute

  • All Implemented Interfaces:
    AnnotationsReader.ElementValue
    Enclosing class:
    AnnotationsReader

    public static class AnnotationsReader.AnnotationAttribute
    extends java.lang.Object
    implements AnnotationsReader.ElementValue
    Representation of an annotation attribute. An annotation has the following format in the bytecode:
     annotation {
       u2 type_index;
       u2 num_element_value_pairs;
       {  u2 element_name_index;
          element_value value;
     } element_value_pairs[num_element_value_pairs];
     
    See the JVM specification section 4.7.16 for details.

    This class implements AnnotationsReader.ElementValue to handle nested annotations.

    • Field Detail

      • type

        public final java.lang.String type
        the type of the annotation
    • Constructor Detail

      • AnnotationAttribute

        public AnnotationAttribute​(java.lang.String type,
                                   java.util.Map<java.lang.String,​AnnotationsReader.ElementValue> elementValues)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object