public abstract class ConstantCP extends Constant
Modifier and Type | Field and Description |
---|---|
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
|
Modifier | Constructor and Description |
---|---|
protected |
ConstantCP(byte tag,
int class_index,
int name_and_type_index) |
|
ConstantCP(ConstantCP c)
Initialize from another object.
|
Modifier and Type | Method and Description |
---|---|
void |
dump(java.io.DataOutputStream file)
Dump constant field reference to file stream in binary format.
|
java.lang.String |
getClass(ConstantPool cp) |
int |
getClassIndex() |
int |
getNameAndTypeIndex() |
void |
setClassIndex(int class_index) |
void |
setNameAndTypeIndex(int name_and_type_index) |
java.lang.String |
toString() |
accept, clone, copy, equals, getComparator, getTag, hashCode, setComparator
protected int class_index
protected int name_and_type_index
public ConstantCP(ConstantCP c)
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 signaturepublic final void dump(java.io.DataOutputStream file) throws java.io.IOException
public final int getClassIndex()
public final int getNameAndTypeIndex()
public final void setClassIndex(int class_index)
class_index
- points to Constant_classpublic java.lang.String getClass(ConstantPool cp)
public final void setNameAndTypeIndex(int name_and_type_index)
name_and_type_index
- points to Constant_NameAndType