Class AnnotationElementValueGen
java.lang.Object
org.apache.bcel.generic.ElementValueGen
org.apache.bcel.generic.AnnotationElementValueGen
Generates annotation element values.
- Since:
- 6.0
-
Field Summary
Fields inherited from class 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
ConstructorsConstructorDescriptionAnnotationElementValueGen(int type, AnnotationEntryGen annotation, ConstantPoolGen cpool) Constructs an AnnotationElementValueGen.AnnotationElementValueGen(AnnotationElementValue value, ConstantPoolGen cpool, boolean copyPoolEntries) Constructs an AnnotationElementValueGen.Constructs an AnnotationElementValueGen. -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(DataOutputStream dos) Dumps this element value to a DataOutputStream.Gets the annotation.Returns an immutable variant of this AnnotationElementValueGen.Returns a string representation of the element value.Methods inherited from class ElementValueGen
copy, getConstantPool, getElementValueType, readElementValue
-
Constructor Details
-
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
Constructs an AnnotationElementValueGen.- Parameters:
a- the annotation entry generator.cpool- the constant pool generator.
-
AnnotationElementValueGen
Constructs an AnnotationElementValueGen.- Parameters:
type- the type.annotation- the annotation.cpool- the constant pool generator.
-
-
Method Details
-
dump
Description copied from class:ElementValueGenDumps this element value to a DataOutputStream.- Specified by:
dumpin classElementValueGen- Parameters:
dos- the output stream.- Throws:
IOException- if an I/O error occurs.
-
getAnnotation
-
getElementValue
Returns an immutable variant of this AnnotationElementValueGen.- Specified by:
getElementValuein classElementValueGen- Returns:
- an immutable variant of this AnnotationElementValueGen.
-
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.
-