org.apache.bcel.classfile
Class ConstantCP
- Cloneable, Node, Serializable
public abstract class ConstantCP
Abstract super class for Fieldref and Methodref constants.
$Id: ConstantCP.java,v 1.2 2002/03/11 16:16:35 mdahm Exp $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
|
class_index
protected int class_index
References to the constants containing the class and the field signature
name_and_type_index
protected int name_and_type_index
References to the constants containing the class and the field signature
ConstantCP
protected ConstantCP(byte tag,
int class_index,
int name_and_type_index)
class_index
- Reference to the class containing the fieldname_and_type_index
- and the field signature
ConstantCP
public ConstantCP(ConstantCP c)
Initialize from another object.
dump
public final void dump(DataOutputStream file)
throws IOException
Dump constant field reference to file stream in binary format.
- dump in interface Constant
file
- Output file stream
getClass
public String getClass(ConstantPool cp)
- Class this field belongs to.
getClassIndex
public final int getClassIndex()
- Reference (index) to class this field or method belongs to.
getNameAndTypeIndex
public final int getNameAndTypeIndex()
- Reference (index) to signature of the field.
setClassIndex
public final void setClassIndex(int class_index)
class_index
- points to Constant_class
setNameAndTypeIndex
public final void setNameAndTypeIndex(int name_and_type_index)
name_and_type_index
- points to Constant_NameAndType