harpoon.IR.RawClass
Class ConstantDouble

java.lang.Object
  extended by harpoon.IR.RawClass.Constant
      extended by harpoon.IR.RawClass.ConstantValue
          extended by harpoon.IR.RawClass.ConstantDouble

public class ConstantDouble
extends ConstantValue

The CONSTANT_Double_info structure represents eight-byte floating-point numeric constants.

Version:
$Id: ConstantDouble.java,v 1.3 2003/09/05 21:45:16 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
"The Java Virtual Machine Specification, section 4.4.5", Constant, ConstantLong

Field Summary
 double val
          The value of the double constant.
 
Fields inherited from class harpoon.IR.RawClass.Constant
parent
 
Constructor Summary
ConstantDouble(ClassFile parent, double val)
          Constructor.
 
Method Summary
 double doubleValue()
          Returns the value of this constant.
 int entrySize()
           
 String toString()
          Create a human-readable representation of this constant.
 Object value()
          Returns the value of this constant, wrapped as a java.lang.Double.
 void write(ClassDataOutputStream out)
          Write to a bytecode file.
 
Methods inherited from class harpoon.IR.RawClass.Constant
print, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

val

public double val
The value of the double constant.

Constructor Detail

ConstantDouble

public ConstantDouble(ClassFile parent,
                      double val)
Constructor.

Method Detail

entrySize

public int entrySize()
Overrides:
entrySize in class Constant

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.

doubleValue

public double doubleValue()
Returns the value of this constant.


value

public Object value()
Returns the value of this constant, wrapped as a java.lang.Double.

Specified by:
value in class ConstantValue

toString

public String toString()
Create a human-readable representation of this constant.

Overrides:
toString in class Constant