|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.IR.RawClass.Constant
harpoon.IR.RawClass.ConstantNameAndType
public class ConstantNameAndType
The CONSTANT_NameAndType_info
structure is used to
represent a field or method, without indicating which class or
interface type it belongs to.
Constant
Field Summary | |
---|---|
int |
descriptor_index
the value of the descriptor_index must be a valid
index into the constant_pool table. |
int |
name_index
The value of the name_index must be a valid index
into the constant_pool table. |
Fields inherited from class harpoon.IR.RawClass.Constant |
---|
parent |
Constructor Summary | |
---|---|
ConstantNameAndType(ClassFile parent,
int name_index,
int descriptor_index)
Constructor. |
Method Summary | |
---|---|
ConstantUtf8 |
descriptor_index()
|
String |
descriptor()
|
ConstantUtf8 |
name_index()
|
String |
name()
|
String |
toString()
Create a human-readable representation of this constant. |
void |
write(ClassDataOutputStream out)
Write to a bytecode file. |
Methods inherited from class harpoon.IR.RawClass.Constant |
---|
entrySize, print, read |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int name_index
name_index
must be a valid index
into the constant_pool
table. The
constant_pool
entry at that index must be a
CONSTANT_Utf8_info
structure representing a valid
Java field name or method name stored as a simple (not fully
qualified) name, that is, as a Java identifier.
public int descriptor_index
descriptor_index
must be a valid
index into the constant_pool
table. The
constant_pool
entry at that index must be a
CONSTANT_Utf8_info
structure representing a valid
Java field descriptor or method descriptor.
Constructor Detail |
---|
public ConstantNameAndType(ClassFile parent, int name_index, int descriptor_index)
Method Detail |
---|
public void write(ClassDataOutputStream out) throws IOException
write
in class Constant
IOException
- on error writing to output stream.public ConstantUtf8 name_index()
public ConstantUtf8 descriptor_index()
public String name()
public String descriptor()
public String toString()
toString
in class Constant
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |