Package org.apache.bcel.classfile
Class AnnotationEntry
- java.lang.Object
-
- org.apache.bcel.classfile.AnnotationEntry
-
-
Constructor Summary
Constructors Constructor Description AnnotationEntry(int type_index, ConstantPool constant_pool, boolean isRuntimeVisible)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.void
addElementNameValuePair(ElementValuePair elementNameValuePair)
static AnnotationEntry[]
createAnnotationEntries(Attribute[] attrs)
void
dump(java.io.DataOutputStream dos)
java.lang.String
getAnnotationType()
int
getAnnotationTypeIndex()
ConstantPool
getConstantPool()
ElementValuePair[]
getElementValuePairs()
int
getNumElementValuePairs()
int
getTypeIndex()
boolean
isRuntimeVisible()
static AnnotationEntry
read(java.io.DataInput input, ConstantPool constant_pool, boolean isRuntimeVisible)
java.lang.String
toShortString()
java.lang.String
toString()
-
-
-
Constructor Detail
-
AnnotationEntry
public AnnotationEntry(int type_index, ConstantPool constant_pool, boolean isRuntimeVisible)
-
-
Method Detail
-
read
public static AnnotationEntry read(java.io.DataInput input, ConstantPool constant_pool, boolean isRuntimeVisible) throws java.io.IOException
- Throws:
java.io.IOException
-
getTypeIndex
public int getTypeIndex()
-
getConstantPool
public ConstantPool getConstantPool()
-
isRuntimeVisible
public boolean isRuntimeVisible()
-
accept
public void accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.
-
getAnnotationType
public java.lang.String getAnnotationType()
- Returns:
- the annotation type name
-
getAnnotationTypeIndex
public int getAnnotationTypeIndex()
- Returns:
- the annotation type index
-
getNumElementValuePairs
public final int getNumElementValuePairs()
- Returns:
- the number of element value pairs in this annotation entry
-
getElementValuePairs
public ElementValuePair[] getElementValuePairs()
- Returns:
- the element value pairs in this annotation entry
-
dump
public void dump(java.io.DataOutputStream dos) throws java.io.IOException
- Throws:
java.io.IOException
-
addElementNameValuePair
public void addElementNameValuePair(ElementValuePair elementNameValuePair)
-
toShortString
public java.lang.String toShortString()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
createAnnotationEntries
public static AnnotationEntry[] createAnnotationEntries(Attribute[] attrs)
-
-