harpoon.IR.RawClass
Class ConstantClass

java.lang.Object
  extended by harpoon.IR.RawClass.Constant
      extended by harpoon.IR.RawClass.ConstantValue
          extended by 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.
 
Fields inherited from class harpoon.IR.RawClass.Constant
parent
 
Constructor Summary
ConstantClass(ClassFile parent, int name_index)
          Constructor.
 
Method Summary
 ConstantUtf8 name_index()
           
 String name()
           
 String toString()
          Create a human-readable representation of this constant.
 Object value()
           
 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

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.

Constructor Detail

ConstantClass

public ConstantClass(ClassFile parent,
                     int name_index)
Constructor.

Method Detail

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