|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.bcel.classfile.Constant
org.apache.bcel.classfile.ConstantCP
public abstract class ConstantCP
Abstract super class for Fieldref and Methodref constants.
ConstantFieldref
,
ConstantMethodref
,
ConstantInterfaceMethodref
,
Serialized FormField Summary | |
---|---|
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 |
Fields inherited from class org.apache.bcel.classfile.Constant |
---|
tag |
Constructor Summary | |
---|---|
(package private) |
ConstantCP(byte tag,
java.io.DataInputStream 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. |
Method Summary | |
---|---|
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()
|
Methods inherited from class org.apache.bcel.classfile.Constant |
---|
accept, clone, copy, equals, getComparator, getTag, hashCode, readConstant, setComparator |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int class_index
protected int name_and_type_index
Constructor Detail |
---|
public ConstantCP(ConstantCP c)
ConstantCP(byte tag, java.io.DataInputStream file) throws java.io.IOException
tag
- Constant type tagfile
- Input stream
java.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 signatureMethod Detail |
---|
public final void dump(java.io.DataOutputStream file) throws java.io.IOException
dump
in class Constant
file
- Output file stream
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_NameAndTypepublic final java.lang.String toString()
toString
in class Constant
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |