org.apache.bcel.classfile

Class AnnotationEntry

public class AnnotationEntry extends Object implements Node, Constants

represents one annotation in the annotation table

Since: 5.3

Version: $Id: AnnotationEntry

Author: D. Brosius

Constructor Summary
AnnotationEntry(int type_index, ConstantPool constant_pool, boolean isRuntimeVisible)
Construct object from file stream.
Method Summary
voidaccept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
voidaddElementNameValuePair(ElementValuePair elementNameValuePair)
voiddump(DataOutputStream dos)
StringgetAnnotationType()
intgetAnnotationTypeIndex()
ElementValuePair[]getElementValuePairs()
intgetNumElementValuePairs()
booleanisRuntimeVisible()
static AnnotationEntryread(DataInputStream file, ConstantPool constant_pool, boolean isRuntimeVisible)
StringtoShortString()

Constructor Detail

AnnotationEntry

public AnnotationEntry(int type_index, ConstantPool constant_pool, boolean isRuntimeVisible)
Construct object from file stream.

Parameters: file Input stream

Throws: IOException

Method Detail

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.

Parameters: v Visitor object

addElementNameValuePair

public void addElementNameValuePair(ElementValuePair elementNameValuePair)

dump

public void dump(DataOutputStream dos)

getAnnotationType

public String getAnnotationType()

Returns: the annotation type name

getAnnotationTypeIndex

public int getAnnotationTypeIndex()

Returns: the annotation type index

getElementValuePairs

public ElementValuePair[] getElementValuePairs()

Returns: the element value pairs in this annotation entry

getNumElementValuePairs

public final int getNumElementValuePairs()

Returns: the number of element value pairs in this annotation entry

isRuntimeVisible

public boolean isRuntimeVisible()

read

public static AnnotationEntry read(DataInputStream file, ConstantPool constant_pool, boolean isRuntimeVisible)

toShortString

public String toShortString()
Copyright © 2004-2007 The Apache Software Foundation. All Rights Reserved.