public abstract class ConstantCP extends Constant
ConstantFieldref
,
ConstantMethodref
,
ConstantInterfaceMethodref
,
ConstantInvokeDynamic
Modifier and Type | Field and Description |
---|---|
protected int |
class_index
Deprecated.
(since 6.0) will be made private; do not access directly, use getter/setter
|
protected int |
name_and_type_index
Deprecated.
(since 6.0) will be made private; do not access directly, use getter/setter
|
Modifier | Constructor and Description |
---|---|
(package private) |
ConstantCP(byte tag,
java.io.DataInput file)
Initialize instance from file data.
|
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, readConstant, setComparator
@Deprecated protected int class_index
@Deprecated protected int name_and_type_index
public ConstantCP(ConstantCP c)
ConstantCP(byte tag, java.io.DataInput file) throws java.io.IOException
tag
- Constant type tagfile
- Input streamjava.io.IOException
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 void setClassIndex(int class_index)
class_index
- points to Constant_classpublic final int getNameAndTypeIndex()
public final void setNameAndTypeIndex(int name_and_type_index)
name_and_type_index
- points to Constant_NameAndTypepublic java.lang.String getClass(ConstantPool cp)