Class ClassElementValue
java.lang.Object
org.apache.bcel.classfile.ElementValue
org.apache.bcel.classfile.ClassElementValue
Represents a class element value in an annotation.
- Since:
- 6.0
-
Field Summary
Fields inherited from class ElementValue
ANNOTATION, ARRAY, CLASS, cpool, ENUM_CONSTANT, PRIMITIVE_BOOLEAN, PRIMITIVE_BYTE, PRIMITIVE_CHAR, PRIMITIVE_DOUBLE, PRIMITIVE_FLOAT, PRIMITIVE_INT, PRIMITIVE_LONG, PRIMITIVE_SHORT, STRING, typeModifier and TypeFieldDescriptionstatic final byteElement value type: annotation.static final byteElement value type: array.static final byteElement value type: class.protected ConstantPoolDeprecated.(since 6.0) will be made private and final; do not access directly, use getter.static final byteElement value type: enum constant.static final byteElement value type: primitive boolean.static final byteElement value type: primitive byte.static final byteElement value type: primitive char.static final byteElement value type: primitive double.static final byteElement value type: primitive float.static final byteElement value type: primitive int.static final byteElement value type: primitive long.static final byteElement value type: primitive short.static final byteElement value type: string.protected intDeprecated.(since 6.0) will be made private and final; do not access directly, use getter. -
Constructor Summary
ConstructorsConstructorDescriptionClassElementValue(int type, int idx, ConstantPool cpool) Constructs a ClassElementValue. -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(DataOutputStream dos) Dumps this element value to a DataOutputStream.Gets the class string.intgetIndex()Gets the index.Returns a string representation of the element value.Methods inherited from class ElementValue
getElementValueType, readElementValue, readElementValue, toShortString, toStringModifier and TypeMethodDescriptionintGets the element value type.static ElementValuereadElementValue(DataInput input, ConstantPool cpool) Reads anelement_valueas anElementValue.static ElementValuereadElementValue(DataInput input, ConstantPool cpool, int arrayNesting) Reads anelement_valueas anElementValue.Returns a short string representation of the element value.toString()Returns a string representation of the element value.
-
Constructor Details
-
ClassElementValue
Constructs a ClassElementValue.- Parameters:
type- The type.idx- The index.cpool- The constant pool.
-
-
Method Details
-
dump
Description copied from class:ElementValueDumps this element value to a DataOutputStream.- Specified by:
dumpin classElementValue- Parameters:
dos- The output stream.- Throws:
IOException- Thrown if an I/O error occurs.
-
getClassString
-
getIndex
-
stringifyValue
Description copied from class:ElementValueReturns a string representation of the element value.- Specified by:
stringifyValuein classElementValue- Returns:
- A string representation of the element value.
-