Package org.apache.bcel.classfile
Class ClassElementValue
- java.lang.Object
-
- org.apache.bcel.classfile.ElementValue
-
- org.apache.bcel.classfile.ClassElementValue
-
public class ClassElementValue extends ElementValue
Represents a class element value in an annotation.- Since:
- 6.0
-
-
Field Summary
Fields Modifier and Type Field Description private intidx-
Fields inherited from class org.apache.bcel.classfile.ElementValue
ANNOTATION, ARRAY, CLASS, cpool, EMPTY_ARRAY, ENUM_CONSTANT, PRIMITIVE_BOOLEAN, PRIMITIVE_BYTE, PRIMITIVE_CHAR, PRIMITIVE_DOUBLE, PRIMITIVE_FLOAT, PRIMITIVE_INT, PRIMITIVE_LONG, PRIMITIVE_SHORT, STRING, type
-
-
Constructor Summary
Constructors Constructor Description ClassElementValue(int type, int idx, ConstantPool cpool)Constructs a ClassElementValue.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddump(java.io.DataOutputStream dos)Dumps this element value to a DataOutputStream.java.lang.StringgetClassString()Gets the class string.intgetIndex()Gets the index.java.lang.StringstringifyValue()Returns a string representation of the element value.-
Methods inherited from class org.apache.bcel.classfile.ElementValue
getConstantPool, getElementValueType, getType, readElementValue, readElementValue, toShortString, toString
-
-
-
-
Constructor Detail
-
ClassElementValue
public ClassElementValue(int type, int idx, ConstantPool cpool)Constructs a ClassElementValue.- Parameters:
type- the type.idx- the index.cpool- the constant pool.
-
-
Method Detail
-
dump
public void dump(java.io.DataOutputStream dos) throws java.io.IOExceptionDescription copied from class:ElementValueDumps this element value to a DataOutputStream.- Specified by:
dumpin classElementValue- Parameters:
dos- the output stream.- Throws:
java.io.IOException- if an I/O error occurs.
-
getClassString
public java.lang.String getClassString()
Gets the class string.- Returns:
- the class string.
-
getIndex
public int getIndex()
Gets the index.- Returns:
- the index.
-
stringifyValue
public java.lang.String 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.
-
-