Class SimpleElementValueGen
java.lang.Object
org.apache.bcel.generic.ElementValueGen
org.apache.bcel.generic.SimpleElementValueGen
Generates simple 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
ConstructorsModifierConstructorDescriptionprotectedSimpleElementValueGen(int type, int idx, ConstantPoolGen cpGen) Protected ctor used for deserialization, doesn't *put* an entry in the constant pool, assumes the one at the supplied index is correct.SimpleElementValueGen(int type, ConstantPoolGen cpGen, boolean value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, byte value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, char value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, double value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, float value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, int value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, long value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, short value) SimpleElementValueGen(int type, ConstantPoolGen cpGen, String value) SimpleElementValueGen(SimpleElementValue value, ConstantPoolGen cpool, boolean copyPoolEntries) The boolean controls whether we copy info from the 'old' constant pool to the 'new'. -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(DataOutputStream dos) Dumps this element value to a DataOutputStream.Return immutable variantintgetIndex()intReturns a string representation of the element value.Methods inherited from class ElementValueGen
copy, getConstantPool, getElementValueType, readElementValue
-
Constructor Details
-
SimpleElementValueGen
-
SimpleElementValueGen
-
SimpleElementValueGen
-
SimpleElementValueGen
-
SimpleElementValueGen
-
SimpleElementValueGen
-
SimpleElementValueGen
-
SimpleElementValueGen
-
SimpleElementValueGen
-
SimpleElementValueGen
Protected ctor used for deserialization, doesn't *put* an entry in the constant pool, assumes the one at the supplied index is correct. -
SimpleElementValueGen
public SimpleElementValueGen(SimpleElementValue value, ConstantPoolGen cpool, boolean copyPoolEntries) The boolean controls whether we copy info from the 'old' constant pool to the 'new'. You need to use this ctor if the annotation is being copied from one file to another.
-
-
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.
-
getElementValue
Return immutable variant- Specified by:
getElementValuein classElementValueGen- Returns:
- an immutable variant of the ElementValueGen.
-
getIndex
-
getValueInt
-
getValueString
-
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.
-