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 Modifier and Type Field Description private AnnotationEntryGena-
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
-
-
-
-
Field Detail
-
a
private final AnnotationEntryGen a
-
-
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.IOExceptionDescription copied from class:ElementValueGenDumps this element value to a DataOutputStream.- Specified by:
dumpin classElementValueGen- Parameters:
dos- the output stream.- Throws:
java.io.IOException- 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.
-
-