harpoon.IR.RawClass
Class ConstantFloat

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

public class ConstantFloat
extends ConstantValue

The CONSTANT_Float_info structure represents four-byte floating-point numeric constants.

Version:
$Id: ConstantFloat.java,v 1.2 2002/02/25 21:05:26 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
"The Java Virtual Machine Specification, section 4.4.4", Constant, ConstantInteger

Field Summary
 float val
          The value of the float constant.
 
Fields inherited from class harpoon.IR.RawClass.Constant
parent
 
Constructor Summary
ConstantFloat(ClassFile parent, float val)
          Constructor.
 
Method Summary
 float floatValue()
          Returns the floating-point value of this constant.
 String toString()
          Create a human-readable representation of this constant.
 Object value()
          Returns the value of this constant, wrapped as a java.lang.Float.
 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

val

public float val
The value of the float constant.

Constructor Detail

ConstantFloat

public ConstantFloat(ClassFile parent,
                     float val)
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.

floatValue

public float floatValue()
Returns the floating-point value of this constant.


value

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

Specified by:
value in class ConstantValue

toString

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

Overrides:
toString in class Constant