|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.asm.attrs.AnnotationMemberValue
TODO update from adding generics 2.5ea The member_value structure is a discriminated union representing the value of a member-value pair. It is used to represent values in all class file attributes that describe annotations ( RuntimeVisibleAnnotations, RuntimeInvisibleAnnotations, RuntimeVisibleParameterAnnotations, and RuntimeInvisibleParameterAnnotations).
The member_value structure has the following format:
member_value { u1 tag; union { u2 const_value_index; { u2 type_name_index; u2 const_name_index; } enum_const_value; u2 class_info_index; annotation annotation_value; { u2 num_values; member_value values[num_values]; } array_value; } value; }The items of the member_value structure are as follows:
tag value Member Type 's' String 'e' enum constant 'c' class '@' annotation type '[' array
annotation
.member_value structure
.
Nested Class Summary | |
static class |
AnnotationMemberValue.EnumConstValue
Container class used to store enum_const_value structure. |
Constructor Summary | |
AnnotationMemberValue()
|
|
AnnotationMemberValue(Object value)
|
Method Summary | |
int |
getTag()
|
Object |
getValue()
|
int |
read(ClassReader cr,
int off,
char[] buf)
Reads member_value data structures. |
String |
toString()
Returns value in the format described in JSR-175 for Java source code. |
ByteVector |
write(ByteVector bv,
ClassWriter cw)
Writes member_value data structures. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AnnotationMemberValue()
public AnnotationMemberValue(Object value)
Method Detail |
public int getTag()
public Object getValue()
public int read(ClassReader cr, int off, char[] buf)
cr
- the class that contains the attribute to be read.off
- index of the first byte of the data structure.buf
- buffer to be used to call readUTF8
,
readClass
or readConst
.
public ByteVector write(ByteVector bv, ClassWriter cw)
bv
- the byte array form to store data structures.cw
- the class to which this attribute must be added. This parameter
can be used to add to the constant pool of this class the items that
corresponds to this attribute.
public String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |