public static class ClassFile.Annotation extends Object implements ClassFile.ElementValue
annotations array as described in JVMS8 4.7.16.ClassFile.ElementValue.Visitor<R,EX extends Throwable>| Modifier and Type | Field and Description |
|---|---|
Map<Short,ClassFile.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.ElementValue> elementValuePairs) |
| Modifier and Type | Method and Description |
|---|---|
<R,EX extends Throwable> |
accept(ClassFile.ElementValue.Visitor<R,EX> visitor)
Invokes the respective method of the
ClassFile.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.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.ElementValue.public Annotation(short typeIndex,
Map<Short,ClassFile.ElementValue> elementValuePairs)
typeIndex - UTF 8 constant pool entry index; field descriptorelementValuePairs - Maps element name index (ClassFile.ConstantUtf8Info) to ClassFile.ElementValuespublic byte getTag()
getTag in interface ClassFile.ElementValuepublic void store(DataOutputStream dos) throws IOException
ClassFile.ElementValuestore in interface ClassFile.ElementValueIOException@Nullable public <R,EX extends Throwable> R accept(ClassFile.ElementValue.Visitor<R,EX> visitor) throws EX extends Throwable
ClassFile.ElementValueClassFile.ElementValue.Visitor.accept in interface ClassFile.ElementValueEX extends ThrowableCopyright © 2019. All rights reserved.