Package org.apache.bcel.generic
Class ClassElementValueGen
- java.lang.Object
-
- org.apache.bcel.generic.ElementValueGen
-
- org.apache.bcel.generic.ClassElementValueGen
-
public class ClassElementValueGen extends ElementValueGen
Generates class element values in annotations.- Since:
- 6.0
-
-
Field Summary
Fields Modifier and Type Field Description private intidx-
Fields inherited from class org.apache.bcel.generic.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
Constructors Modifier Constructor Description protectedClassElementValueGen(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
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.ElementValuegetElementValue()Return immutable variant of this ClassElementValueGen.intgetIndex()Gets the index.java.lang.StringstringifyValue()Returns a string representation of the element value.-
Methods inherited from class org.apache.bcel.generic.ElementValueGen
copy, getConstantPool, getElementValueType, readElementValue
-
-
-
-
Constructor Detail
-
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
protected ClassElementValueGen(int typeIdx, ConstantPoolGen cpool)Constructs a ClassElementValueGen.- Parameters:
typeIdx- the type index.cpool- the constant pool generator.
-
ClassElementValueGen
public ClassElementValueGen(ObjectType t, ConstantPoolGen cpool)
Constructs a ClassElementValueGen.- Parameters:
t- the object type.cpool- the constant pool generator.
-
-
Method Detail
-
dump
public void dump(java.io.DataOutputStream dos) throws java.io.IOExceptionDescription copied from class:ElementValueGenDumps this element value to a DataOutputStream.- Specified by:
dumpin classElementValueGen- 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.
-
getElementValue
public ElementValue getElementValue()
Return immutable variant of this ClassElementValueGen.- Specified by:
getElementValuein classElementValueGen- Returns:
- immutable variant of this ClassElementValueGen.
-
getIndex
public int getIndex()
Gets the index.- Returns:
- the index.
-
stringifyValue
public java.lang.String 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.
-
-