org.apache.bcel.generic

Class AnnotationEntryGen

public class AnnotationEntryGen extends Object

Constructor Summary
AnnotationEntryGen(AnnotationEntry a, ConstantPoolGen cpool, boolean copyPoolEntries)
Here we are taking a fixed annotation of type Annotation and building a modifiable AnnotationGen object.
AnnotationEntryGen(ObjectType type, List elements, boolean vis, ConstantPoolGen cpool)
Method Summary
voidaddElementNameValuePair(ElementValuePairGen evp)
voiddump(DataOutputStream dos)
AnnotationEntrygetAnnotation()
Retrieve an immutable version of this AnnotationGen
intgetTypeIndex()
StringgetTypeName()
StringgetTypeSignature()
ListgetValues()
Returns list of ElementNameValuePair objects
booleanisRuntimeVisible()
static AnnotationEntryGenread(DataInputStream dis, ConstantPoolGen cpool, boolean b)
StringtoShortString()
StringtoString()

Constructor Detail

AnnotationEntryGen

public AnnotationEntryGen(AnnotationEntry a, ConstantPoolGen cpool, boolean copyPoolEntries)
Here we are taking a fixed annotation of type Annotation and building a modifiable AnnotationGen object. If the pool passed in is for a different class file, then copyPoolEntries should have been passed as true as that will force us to do a deep copy of the annotation and move the cpool entries across. We need to copy the type and the element name value pairs and the visibility.

AnnotationEntryGen

public AnnotationEntryGen(ObjectType type, List elements, boolean vis, ConstantPoolGen cpool)

Method Detail

addElementNameValuePair

public void addElementNameValuePair(ElementValuePairGen evp)

dump

public void dump(DataOutputStream dos)

getAnnotation

public AnnotationEntry getAnnotation()
Retrieve an immutable version of this AnnotationGen

getTypeIndex

public int getTypeIndex()

getTypeName

public final String getTypeName()

getTypeSignature

public final String getTypeSignature()

getValues

public List getValues()
Returns list of ElementNameValuePair objects

isRuntimeVisible

public boolean isRuntimeVisible()

read

public static AnnotationEntryGen read(DataInputStream dis, ConstantPoolGen cpool, boolean b)

toShortString

public String toShortString()

toString

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