Package org.apache.bcel.classfile
Class AnnotationEntry
java.lang.Object
org.apache.bcel.classfile.AnnotationEntry
- All Implemented Interfaces:
Node
Represents one annotation in the annotation table
- Since:
- 6.0
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAnnotationEntry
(int typeIndex, ConstantPool constantPool, boolean isRuntimeVisible) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.void
addElementNameValuePair
(ElementValuePair elementNameValuePair) static AnnotationEntry[]
createAnnotationEntries
(Attribute[] attributes) void
dump
(DataOutputStream dos) int
final int
int
boolean
static AnnotationEntry
read
(DataInput input, ConstantPool constantPool, boolean isRuntimeVisible) Factory method to create an AnnotionEntry from a DataInputtoString()
-
Field Details
-
EMPTY_ARRAY
-
-
Constructor Details
-
AnnotationEntry
-
-
Method Details
-
createAnnotationEntries
-
read
public static AnnotationEntry read(DataInput input, ConstantPool constantPool, boolean isRuntimeVisible) throws IOException Factory method to create an AnnotionEntry from a DataInput- Parameters:
input
-constantPool
-isRuntimeVisible
-- Returns:
- the entry
- Throws:
IOException
- if an I/O error occurs.
-
accept
Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects. -
addElementNameValuePair
-
dump
- Throws:
IOException
-
getAnnotationType
- Returns:
- the annotation type name
-
getAnnotationTypeIndex
- Returns:
- the annotation type index
-
getConstantPool
-
getElementValuePairs
- Returns:
- the element value pairs in this annotation entry
-
getNumElementValuePairs
- Returns:
- the number of element value pairs in this annotation entry
-
getTypeIndex
-
isRuntimeVisible
-
toShortString
-
toString
-