public class AnnotationEntryGen
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private ConstantPoolGen |
cpool |
private java.util.List<ElementValuePairGen> |
evs |
private boolean |
isRuntimeVisible |
private int |
typeIndex |
Modifier | Constructor and Description |
---|---|
|
AnnotationEntryGen(AnnotationEntry a,
ConstantPoolGen cpool,
boolean copyPoolEntries)
Here we are taking a fixed annotation of type Annotation and building a
modifiable AnnotationGen object.
|
private |
AnnotationEntryGen(ConstantPoolGen cpool) |
|
AnnotationEntryGen(ObjectType type,
java.util.List<ElementValuePairGen> elements,
boolean vis,
ConstantPoolGen cpool) |
Modifier and Type | Method and Description |
---|---|
void |
addElementNameValuePair(ElementValuePairGen evp) |
private java.util.List<ElementValuePairGen> |
copyValues(ElementValuePair[] in,
ConstantPoolGen cpool,
boolean copyPoolEntries) |
void |
dump(java.io.DataOutputStream dos) |
AnnotationEntry |
getAnnotation()
Retrieve an immutable version of this AnnotationGen
|
(package private) static Attribute[] |
getAnnotationAttributes(ConstantPoolGen cp,
AnnotationEntryGen[] annotationEntryGens)
Converts a list of AnnotationGen objects into a set of attributes
that can be attached to the class file.
|
(package private) static Attribute[] |
getParameterAnnotationAttributes(ConstantPoolGen cp,
java.util.List<AnnotationEntryGen>[] vec)
Annotations against a class are stored in one of four attribute kinds:
- RuntimeVisibleParameterAnnotations
- RuntimeInvisibleParameterAnnotations
|
int |
getTypeIndex() |
java.lang.String |
getTypeName() |
java.lang.String |
getTypeSignature() |
java.util.List<ElementValuePairGen> |
getValues()
Returns list of ElementNameValuePair objects
|
boolean |
isRuntimeVisible() |
private void |
isRuntimeVisible(boolean b) |
static AnnotationEntryGen |
read(java.io.DataInput dis,
ConstantPoolGen cpool,
boolean b) |
java.lang.String |
toShortString() |
java.lang.String |
toString() |
private int typeIndex
private java.util.List<ElementValuePairGen> evs
private final ConstantPoolGen cpool
private boolean isRuntimeVisible
public AnnotationEntryGen(AnnotationEntry a, ConstantPoolGen cpool, boolean copyPoolEntries)
private AnnotationEntryGen(ConstantPoolGen cpool)
public AnnotationEntryGen(ObjectType type, java.util.List<ElementValuePairGen> elements, boolean vis, ConstantPoolGen cpool)
private java.util.List<ElementValuePairGen> copyValues(ElementValuePair[] in, ConstantPoolGen cpool, boolean copyPoolEntries)
public AnnotationEntry getAnnotation()
public static AnnotationEntryGen read(java.io.DataInput dis, ConstantPoolGen cpool, boolean b) throws java.io.IOException
java.io.IOException
public void dump(java.io.DataOutputStream dos) throws java.io.IOException
java.io.IOException
public void addElementNameValuePair(ElementValuePairGen evp)
public int getTypeIndex()
public final java.lang.String getTypeSignature()
public final java.lang.String getTypeName()
public java.util.List<ElementValuePairGen> getValues()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toShortString()
private void isRuntimeVisible(boolean b)
public boolean isRuntimeVisible()
static Attribute[] getAnnotationAttributes(ConstantPoolGen cp, AnnotationEntryGen[] annotationEntryGens)
cp
- The constant pool gen where we can create the necessary name refsannotationEntryGens
- An array of AnnotationGen objectsstatic Attribute[] getParameterAnnotationAttributes(ConstantPoolGen cp, java.util.List<AnnotationEntryGen>[] vec)