org.apache.bcel.classfile
public abstract class ConstantCP extends Constant
Version: $Id: ConstantCP.java 386056 2006-03-15 11:31:56Z tcurdt $
See Also: ConstantFieldref ConstantMethodref ConstantInterfaceMethodref
| Field Summary | |
|---|---|
| protected int | class_index References to the constants containing the class and the field signature |
| protected int | name_and_type_index References to the constants containing the class and the field signature |
| Constructor Summary | |
|---|---|
| ConstantCP(ConstantCP c)
Initialize from another object. | |
| ConstantCP(byte tag, DataInputStream file)
Initialize instance from file data.
| |
| protected | ConstantCP(byte tag, int class_index, int name_and_type_index) |
| Method Summary | |
|---|---|
| void | dump(DataOutputStream file)
Dump constant field reference to file stream in binary format.
|
| String | getClass(ConstantPool cp) |
| int | getClassIndex() |
| int | getNameAndTypeIndex() |
| void | setClassIndex(int class_index) |
| void | setNameAndTypeIndex(int name_and_type_index) |
| String | toString() |
Parameters: tag Constant type tag file Input stream
Throws: IOException
Parameters: class_index Reference to the class containing the field name_and_type_index and the field signature
Parameters: file Output file stream
Throws: IOException
Returns: Class this field belongs to.
Returns: Reference (index) to class this field or method belongs to.
Returns: Reference (index) to signature of the field.
Parameters: class_index points to Constant_class
Parameters: name_and_type_index points to Constant_NameAndType
Returns: String representation.