Class ClassFile.Annotation
java.lang.Object
org.codehaus.janino.util.ClassFile.Annotation
- All Implemented Interfaces:
ClassFile.ElementValue
- Enclosing class:
ClassFile
The structure of the
annotations array as described in JVMS8 4.7.16.-
Nested Class Summary
Nested classes/interfaces inherited from interface ClassFile.ElementValue
ClassFile.ElementValue.Visitor<R,EX> -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Map<Short, ClassFile.ElementValue> The "element_value_pairs" field of theannotationtype as described in JVMS8 4.7.16.final shortThe "type_index" field of theannotationtype as described in JVMS8 4.7.16. -
Constructor Summary
ConstructorsConstructorDescriptionAnnotation(short typeIndex, Map<Short, ClassFile.ElementValue> elementValuePairs) -
Method Summary
Modifier and TypeMethodDescription<R, EX extends Throwable>
Raccept(ClassFile.ElementValue.Visitor<R, EX> visitor) Invokes the respective method of theClassFile.ElementValue.Visitor.bytegetTag()voidstore(DataOutputStream dos) Writes this element value in an element-value-type dependent way; see JVMS8 4.7.16.1.
-
Field Details
-
typeIndex
public final short typeIndexThe "type_index" field of theannotationtype 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. -
elementValuePairs
The "element_value_pairs" field of theannotationtype as described in JVMS8 4.7.16. Key is the "element_name_index" (a constant pool index to aClassFile.ConstantUtf8Info); value is anClassFile.ElementValue.
-
-
Constructor Details
-
Annotation
- Parameters:
typeIndex- UTF 8 constant pool entry index; field descriptorelementValuePairs- Maps element name index (ClassFile.ConstantUtf8Info) toClassFile.ElementValues
-
-
Method Details
-
getTag
public byte getTag()- Specified by:
getTagin interfaceClassFile.ElementValue- Returns:
- The "tag" byte to use when storing this "value" in an "element_value" structure
-
store
Description copied from interface:ClassFile.ElementValueWrites this element value in an element-value-type dependent way; see JVMS8 4.7.16.1. The "tag" byte is snot part of this writing!- Specified by:
storein interfaceClassFile.ElementValue- Throws:
IOException
-
accept
@Nullable public <R, EX extends Throwable> R accept(ClassFile.ElementValue.Visitor<R, EX> visitor) throws EXDescription copied from interface:ClassFile.ElementValueInvokes the respective method of theClassFile.ElementValue.Visitor.- Specified by:
acceptin interfaceClassFile.ElementValue- Throws:
EX
-