public static class ClassFile.AnnotationsAttribute.Annotation extends Object implements ClassFile.AnnotationsAttribute.ElementValue
classes array as described in JVMS7 4.7.6.ClassFile.AnnotationsAttribute.ElementValue.Visitor<R,EX extends Throwable>| Modifier and Type | Field and Description |
|---|---|
Map<Short,ClassFile.AnnotationsAttribute.ElementValue> |
elementValuePairs
The "element_value_pairs" field of the
annotation type as described in JVMS8 4.7.16. |
short |
typeIndex
The "type_index" field of the
annotation type as described in JVMS8 4.7.16. |
| Constructor and Description |
|---|
Annotation(short typeIndex,
Map<Short,ClassFile.AnnotationsAttribute.ElementValue> elementValuePairs) |
| Modifier and Type | Method and Description |
|---|---|
<R,EX extends Throwable> |
accept(ClassFile.AnnotationsAttribute.ElementValue.Visitor<R,EX> visitor)
Invokes the respective method of the
ClassFile.AnnotationsAttribute.ElementValue.Visitor. |
byte |
getTag() |
void |
store(DataOutputStream dos)
Writes this element value in an element-value-type dependent way; see JVMS8 4.7.16.1.
|
public final short typeIndex
annotation type as described in JVMS8 4.7.16. The constant pool
entry at that index must be a CONSTANT_Utf8_info structure representing a field descriptor.public final Map<Short,ClassFile.AnnotationsAttribute.ElementValue> elementValuePairs
annotation type as described in JVMS8 4.7.16.
Key is the "element_name_index" (a constant pool index to a ClassFile.ConstantUtf8Info);
value is an ClassFile.AnnotationsAttribute.ElementValue.public Annotation(short typeIndex,
Map<Short,ClassFile.AnnotationsAttribute.ElementValue> elementValuePairs)
typeIndex - UTF 8 constant pool entry index; field descriptorelementValuePairs - Maps element name index (ClassFile.ConstantUtf8Info) to ClassFile.AnnotationsAttribute.ElementValuespublic byte getTag()
getTag in interface ClassFile.AnnotationsAttribute.ElementValuepublic void store(DataOutputStream dos) throws IOException
ClassFile.AnnotationsAttribute.ElementValuestore in interface ClassFile.AnnotationsAttribute.ElementValueIOException@Nullable public <R,EX extends Throwable> R accept(ClassFile.AnnotationsAttribute.ElementValue.Visitor<R,EX> visitor) throws EX extends Throwable
ClassFile.AnnotationsAttribute.ElementValueClassFile.AnnotationsAttribute.ElementValue.Visitor.accept in interface ClassFile.AnnotationsAttribute.ElementValueEX extends Throwable