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, typeModifier and TypeFieldDescriptionstatic final intElement value type: annotation.static final intElement value type: array.static final intElement value type: class.protected ConstantPoolGenDeprecated.(since 6.0) will be made private and final; do not access directly, use getterstatic final intElement value type: enum constant.static final intElement value type: primitive boolean.static final intElement value type: primitive byte.static final intElement value type: primitive char.static final intElement value type: primitive double.static final intElement value type: primitive float.static final intElement value type: primitive int.static final intElement value type: primitive long.static final intElement value type: primitive short.static final intElement value type: string.protected intDeprecated.(since 6.0) will be made private and final; do not access directly, use getter -
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.Gets an immutable variant of this AnnotationElementValueGen.Always throwsUnsupportedOperationExceptionbecause this operation is not implemented.Methods inherited from class ElementValueGen
copy, getConstantPool, getElementValueType, readElementValueModifier and TypeMethodDescriptionstatic ElementValueGencopy(ElementValue value, ConstantPoolGen cpool, boolean copyPoolEntries) Creates an (modifiable) ElementValueGen copy of an (immutable) ElementValue - constant pool is assumed correct.protected ConstantPoolGenGets the constant pool.intGets the element value type.static ElementValueGenreadElementValue(DataInput dis, ConstantPoolGen cpGen) Reads an element value from a DataInput.
-
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- Thrown if an I/O error occurs.
-
getAnnotation
-
getElementValue
Gets an immutable variant of this AnnotationElementValueGen.- Specified by:
getElementValuein classElementValueGen- Returns:
- An immutable variant of this AnnotationElementValueGen.
-
stringifyValue
Always throwsUnsupportedOperationExceptionbecause this operation is not implemented.- Specified by:
stringifyValuein classElementValueGen- Returns:
- A string representation of the element value.
- Throws:
UnsupportedOperationException- Thrown unconditionally.
-