Class ClassElementValueGen
java.lang.Object
org.apache.bcel.generic.ElementValueGen
org.apache.bcel.generic.ClassElementValueGen
Generates class element values in annotations.
- 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
ConstructorsModifierConstructorDescriptionprotectedClassElementValueGen(int typeIdx, ConstantPoolGen cpool) Constructs a ClassElementValueGen.ClassElementValueGen(ClassElementValue value, ConstantPoolGen cpool, boolean copyPoolEntries) Constructs a ClassElementValueGen.ClassElementValueGen(ObjectType t, ConstantPoolGen cpool) Constructs a ClassElementValueGen. -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(DataOutputStream dos) Dumps this element value to a DataOutputStream.Gets the class string.Return immutable variant of this ClassElementValueGen.intgetIndex()Gets the index.Returns a string representation of the element value.Methods inherited from class ElementValueGen
copy, getConstantPool, getElementValueType, readElementValue
-
Constructor Details
-
ClassElementValueGen
public ClassElementValueGen(ClassElementValue value, ConstantPoolGen cpool, boolean copyPoolEntries) Constructs a ClassElementValueGen.- Parameters:
value- the class element value.cpool- the constant pool generator.copyPoolEntries- whether to copy pool entries.
-
ClassElementValueGen
Constructs a ClassElementValueGen.- Parameters:
typeIdx- the type index.cpool- the constant pool generator.
-
ClassElementValueGen
Constructs a ClassElementValueGen.- Parameters:
t- the object type.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.
-
getClassString
-
getElementValue
Return immutable variant of this ClassElementValueGen.- Specified by:
getElementValuein classElementValueGen- Returns:
- immutable variant of this ClassElementValueGen.
-
getIndex
-
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.
-