jellyj.classfile.javaclass
Class ConstantFloat

jellyj.classfile.javaclass.Constant
  |
  +--jellyj.classfile.javaclass.ConstantFloat

public final class ConstantFloat
extends Constant

This class is derived from the abstract Constant class and represents a reference to a float object.

Author:
JellyJ Design Group
See Also: Constant

Constructor Summary
 ConstantFloat()
          Empty constructor, all attributes have to be defined via `setXXX' methods.
 ConstantFloat(float bytes)
           
 ConstantFloat(ConstantFloat c)
          Initialize from another object.
 (package private) ConstantFloat(DataInputStream file)
          Initialize instance from file data.

Method Summary
 voidaccept(Visitor v)
          Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
 final voiddump(DataOutputStream file)
          Dump constant float to file stream in binary format.
 final floatgetBytes()
           
 final voidsetBytes(float bytes)
           
 final StringtoString()
           

Methods inherited from class jellyj.classfile.javaclass.Constant
getTag

Constructor Detail

ConstantFloat

public ConstantFloat()
Empty constructor, all attributes have to be defined via `setXXX' methods. Use at your own risk.

ConstantFloat

public ConstantFloat(float bytes)
Parameters:
bytes - Data

ConstantFloat

public ConstantFloat(ConstantFloat c)
Initialize from another object. Note that both objects use the same references (shallow copy). Use clone() for a physical copy.

ConstantFloat

ConstantFloat(DataInputStream file)
throws java.io.IOException
Initialize instance from file data.
Parameters:
file - Input stream
throw IOException
Method Detail

accept

public void accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.
Parameters:
v - Visitor object

dump

public final void dump(DataOutputStream file)
throws java.io.IOException
Dump constant float to file stream in binary format.
Parameters:
file - Output file stream
throw IOException

getBytes

public final float getBytes()
Returns: data, i.e. 4 bytes.

setBytes

public final void setBytes(float bytes)
Parameters:
bytes.

toString

public final String toString()
Returns: String representation.