All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class harpoon.IR.Bytecode.OpConstant

java.lang.Object
   |
   +----harpoon.IR.Bytecode.Operand
           |
           +----harpoon.IR.Bytecode.OpConstant

public class OpConstant
extends Operand
OpConstant represents a constant operand of a java bytecode instruction. This would typically be taken from the constant_pool.

OpConstant represents constant pool entries of type CONSTANT_Double, CONSTANT_Float, CONSTANT_Integer, CONSTANT_Long, and CONSTANT_String.

Version:
$Id: OpConstant.java,v 1.2 1998/10/11 03:01:16 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
Operand, Instr, ConstantDouble, ConstantFloat, ConstantInteger, ConstantLong, ConstantString

Constructor Index

 o OpConstant(Code, int)
Make a new OpConstant from a constant_pool entry.
 o OpConstant(Object, HClass)
Make a new OpConstant with the specified value and type.

Method Index

 o getType()
Return the HClass type of this Operand.
 o getValue()
Return the value of this Operand.
 o toString()
Return a human-readable representation of this OpConstant.

Constructors

 o OpConstant
 public OpConstant(Object value,
                   HClass type)
Make a new OpConstant with the specified value and type.

 o OpConstant
 public OpConstant(Code parent,
                   int constant_pool_index)
Make a new OpConstant from a constant_pool entry.

Methods

 o getValue
 public Object getValue()
Return the value of this Operand.

 o getType
 public HClass getType()
Return the HClass type of this Operand.

 o toString
 public String toString()
Return a human-readable representation of this OpConstant.

Overrides:
toString in class Operand

All Packages  Class Hierarchy  This Package  Previous  Next  Index