Package org.apache.bcel.generic
Class AnnotationEntryGen
- java.lang.Object
-
- org.apache.bcel.generic.AnnotationEntryGen
-
public class AnnotationEntryGen extends java.lang.Object
- Since:
- 6.0
-
-
Constructor Summary
Constructors Constructor Description 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, java.util.List<ElementValuePairGen> elements, boolean vis, ConstantPoolGen cpool)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addElementNameValuePair(ElementValuePairGen evp)
void
dump(java.io.DataOutputStream dos)
AnnotationEntry
getAnnotation()
Retrieve an immutable version of this AnnotationGenint
getTypeIndex()
java.lang.String
getTypeName()
java.lang.String
getTypeSignature()
java.util.List<ElementValuePairGen>
getValues()
Returns list of ElementNameValuePair objectsboolean
isRuntimeVisible()
static AnnotationEntryGen
read(java.io.DataInput dis, ConstantPoolGen cpool, boolean b)
java.lang.String
toShortString()
java.lang.String
toString()
-
-
-
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, java.util.List<ElementValuePairGen> elements, boolean vis, ConstantPoolGen cpool)
-
-
Method Detail
-
getAnnotation
public AnnotationEntry getAnnotation()
Retrieve an immutable version of this AnnotationGen
-
read
public static AnnotationEntryGen read(java.io.DataInput dis, ConstantPoolGen cpool, boolean b) throws java.io.IOException
- Throws:
java.io.IOException
-
dump
public void dump(java.io.DataOutputStream dos) throws java.io.IOException
- Throws:
java.io.IOException
-
addElementNameValuePair
public void addElementNameValuePair(ElementValuePairGen evp)
-
getTypeIndex
public int getTypeIndex()
-
getTypeSignature
public final java.lang.String getTypeSignature()
-
getTypeName
public final java.lang.String getTypeName()
-
getValues
public java.util.List<ElementValuePairGen> getValues()
Returns list of ElementNameValuePair objects
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toShortString
public java.lang.String toShortString()
-
isRuntimeVisible
public boolean isRuntimeVisible()
-
-