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 |
|---|---|
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() |
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)
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 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 String getClass(ConstantPool cp)
Copyright © 2004–2019 The Apache Software Foundation. All rights reserved.