Package org.apache.bcel.generic
Class AnnotationElementValueGen
- java.lang.Object
-
- org.apache.bcel.generic.ElementValueGen
-
- org.apache.bcel.generic.AnnotationElementValueGen
-
public class AnnotationElementValueGen extends ElementValueGen
Generates annotation element values.- Since:
- 6.0
-
-
Field Summary
-
Fields inherited from class org.apache.bcel.generic.ElementValueGen
ANNOTATION, ARRAY, CLASS, cpGen, ENUM_CONSTANT, PRIMITIVE_BOOLEAN, PRIMITIVE_BYTE, PRIMITIVE_CHAR, PRIMITIVE_DOUBLE, PRIMITIVE_FLOAT, PRIMITIVE_INT, PRIMITIVE_LONG, PRIMITIVE_SHORT, STRING, type
-
-
Constructor Summary
Constructors Constructor Description AnnotationElementValueGen(int type, AnnotationEntryGen annotation, ConstantPoolGen cpool)Constructs an AnnotationElementValueGen.AnnotationElementValueGen(AnnotationElementValue value, ConstantPoolGen cpool, boolean copyPoolEntries)Constructs an AnnotationElementValueGen.AnnotationElementValueGen(AnnotationEntryGen a, ConstantPoolGen cpool)Constructs an AnnotationElementValueGen.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddump(java.io.DataOutputStream dos)Dumps this element value to a DataOutputStream.AnnotationEntryGengetAnnotation()Gets the annotation.ElementValuegetElementValue()Returns an immutable variant of this AnnotationElementValueGen.java.lang.StringstringifyValue()Returns a string representation of the element value.-
Methods inherited from class org.apache.bcel.generic.ElementValueGen
copy, getConstantPool, getElementValueType, readElementValue
-
-
-
-
Constructor Detail
-
AnnotationElementValueGen
public AnnotationElementValueGen(AnnotationElementValue value, ConstantPoolGen cpool, boolean copyPoolEntries)
Constructs an AnnotationElementValueGen.- Parameters:
value- The annotation element value.cpool- The constant pool generator.copyPoolEntries- whether to copy pool entries.
-
AnnotationElementValueGen
public AnnotationElementValueGen(AnnotationEntryGen a, ConstantPoolGen cpool)
Constructs an AnnotationElementValueGen.- Parameters:
a- The annotation entry generator.cpool- The constant pool generator.
-
AnnotationElementValueGen
public AnnotationElementValueGen(int type, AnnotationEntryGen annotation, ConstantPoolGen cpool)
Constructs an AnnotationElementValueGen.- Parameters:
type- The type.annotation- The annotation.cpool- The constant pool generator.
-
-
Method Detail
-
dump
public void dump(java.io.DataOutputStream dos) throws java.io.IOException
Description copied from class:ElementValueGenDumps this element value to a DataOutputStream.- Specified by:
dumpin classElementValueGen- Parameters:
dos- The output stream.- Throws:
java.io.IOException- Thrown if an I/O error occurs.
-
getAnnotation
public AnnotationEntryGen getAnnotation()
Gets the annotation.- Returns:
- The annotation.
-
getElementValue
public ElementValue getElementValue()
Returns an immutable variant of this AnnotationElementValueGen.- Specified by:
getElementValuein classElementValueGen- Returns:
- An immutable variant of this AnnotationElementValueGen.
-
stringifyValue
public java.lang.String stringifyValue()
Description copied from class:ElementValueGenReturns a string representation of the element value.- Specified by:
stringifyValuein classElementValueGen- Returns:
- A string representation of the element value.
-
-