harpoon.IR.RawClass
Class ConstantClass
java.lang.Object
harpoon.IR.RawClass.Constant
harpoon.IR.RawClass.ConstantValue
harpoon.IR.RawClass.ConstantClass
public class ConstantClass
- extends ConstantValue
The CONSTANT_Class_info
structure is used to
represent a class or an interface.
- Version:
- $Id: ConstantClass.java,v 1.4 2005/10/05 16:21:32 salcianu Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
- See Also:
- "The Java Virtual Machine Specification, section 4.4.1",
Constant
Field Summary |
int |
name_index
The value of the name_index item must be a valid
index into the constant_pool table of
parent . |
name_index
public int name_index
- The value of the
name_index
item must be a valid
index into the constant_pool
table of
parent
. The constant_pool
entry at
that index must be a CONSTANT_Utf8_info
structure
representing a valid fully qualified Java class name that has
been converted to the class
file's internal form.
ConstantClass
public ConstantClass(ClassFile parent,
int name_index)
- Constructor.
write
public void write(ClassDataOutputStream out)
throws IOException
- Write to a bytecode file.
- Specified by:
write
in class Constant
- Throws:
IOException
- on error writing to output stream.
name_index
public ConstantUtf8 name_index()
name
public String name()
value
public Object value()
- Specified by:
value
in class ConstantValue
toString
public String toString()
- Create a human-readable representation of this constant.
- Overrides:
toString
in class Constant