public abstract class ConstantCP extends Constant
ConstantFieldref,
ConstantMethodref,
ConstantInterfaceMethodref,
Serialized Form| 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(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() |
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(DataOutputStream file) throws IOException
dump in class Constantfile - Output file streamIOExceptionpublic final int getClassIndex()
public final int getNameAndTypeIndex()
public final void setClassIndex(int class_index)
class_index - points to Constant_classpublic String getClass(ConstantPool cp)
public final void setNameAndTypeIndex(int name_and_type_index)
name_and_type_index - points to Constant_NameAndTypeCopyright © 2018–2021 mhoffrogge. All rights reserved.