ej-technologies

org.gjt.jclasslib.structures.constants
Class ConstantDoubleInfo

java.lang.Object
  extended byorg.gjt.jclasslib.structures.AbstractStructure
      extended byorg.gjt.jclasslib.structures.CPInfo
          extended byorg.gjt.jclasslib.structures.constants.ConstantLargeNumeric
              extended byorg.gjt.jclasslib.structures.constants.ConstantDoubleInfo

public class ConstantDoubleInfo
extends ConstantLargeNumeric

Describes a CONSTANT_Double_info constant pool data structure.

Version:
$Revision: 1.4 $ $Date: 2003/08/20 17:14:37 $
Author:
Ingo Kegel

Field Summary
 
Fields inherited from class org.gjt.jclasslib.structures.constants.ConstantLargeNumeric
highBytes, lowBytes, SIZE
 
Fields inherited from class org.gjt.jclasslib.structures.CPInfo
CONSTANT_CLASS, CONSTANT_CLASS_VERBOSE, CONSTANT_DOUBLE, CONSTANT_DOUBLE_VERBOSE, CONSTANT_FIELDREF, CONSTANT_FIELDREF_VERBOSE, CONSTANT_FLOAT, CONSTANT_FLOAT_VERBOSE, CONSTANT_INTEGER, CONSTANT_INTEGER_VERBOSE, CONSTANT_INTERFACE_METHODREF, CONSTANT_INTERFACE_METHODREF_VERBOSE, CONSTANT_LONG, CONSTANT_LONG_VERBOSE, CONSTANT_METHODREF, CONSTANT_METHODREF_VERBOSE, CONSTANT_NAME_AND_TYPE, CONSTANT_NAME_AND_TYPE_VERBOSE, CONSTANT_STRING, CONSTANT_STRING_VERBOSE, CONSTANT_UTF8, CONSTANT_UTF8_VERBOSE
 
Fields inherited from class org.gjt.jclasslib.structures.AbstractStructure
classFile, debug, SYSTEM_PROPERTY_DEBUG
 
Constructor Summary
ConstantDoubleInfo()
           
 
Method Summary
protected  void debug(String message)
          Utility method for derived structures.
 double getDouble()
          Get the double value of this constant pool entry.
 byte getTag()
          Get the value of the tag field of the cp_info structure.
 String getTagVerbose()
          Get the verbose description of the tag field of the cp_info structure.
 String getVerbose()
          Get the verbose description of the content of the constant pool entry.
 void read(DataInput in)
          Read this structure from the given DataInput.
 void setDouble(double number)
          Set the double value of this constant pool entry.
 void write(DataOutput out)
          Write this structure to the given DataOutput.
 
Methods inherited from class org.gjt.jclasslib.structures.constants.ConstantLargeNumeric
equals, getFormattedHighBytes, getFormattedLowBytes, getHighBytes, getLowBytes, hashCode, setHighBytes, setLowBytes
 
Methods inherited from class org.gjt.jclasslib.structures.CPInfo
create, printAccessFlagsVerbose, skip
 
Methods inherited from class org.gjt.jclasslib.structures.AbstractStructure
getClassFile, getDebug, getLength, printAccessFlags, printAccessFlagsVerbose, printBytes, setClassFile, setDebug
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantDoubleInfo

public ConstantDoubleInfo()
Method Detail

getTag

public byte getTag()
Description copied from class: CPInfo
Get the value of the tag field of the cp_info structure.

Specified by:
getTag in class CPInfo
Returns:
the tag

getTagVerbose

public String getTagVerbose()
Description copied from class: CPInfo
Get the verbose description of the tag field of the cp_info structure.

Specified by:
getTagVerbose in class CPInfo
Returns:
the verbose description

getVerbose

public String getVerbose()
                  throws InvalidByteCodeException
Description copied from class: CPInfo
Get the verbose description of the content of the constant pool entry.

Overrides:
getVerbose in class CPInfo
Returns:
the verbose description
Throws:
InvalidByteCodeException - if the byte code is invalid

getDouble

public double getDouble()
Get the double value of this constant pool entry.

Returns:
the value

setDouble

public void setDouble(double number)
Set the double value of this constant pool entry.

Parameters:
number - the value

read

public void read(DataInput in)
          throws InvalidByteCodeException,
                 IOException
Description copied from class: AbstractStructure
Read this structure from the given DataInput.

Excpects DataInput to be in JVM class file format and just before a structure of this kind. No look ahead parsing since the class file format is deterministic.

Overrides:
read in class ConstantLargeNumeric
Throws:
InvalidByteCodeException
IOException

write

public void write(DataOutput out)
           throws InvalidByteCodeException,
                  IOException
Description copied from class: AbstractStructure
Write this structure to the given DataOutput.

The written bytes are in JVM class file format.

Overrides:
write in class ConstantLargeNumeric
Throws:
InvalidByteCodeException
IOException

debug

protected void debug(String message)
Description copied from class: AbstractStructure
Utility method for derived structures. Dump a specific debug message.

Overrides:
debug in class AbstractStructure
Parameters:
message - the debug message

ej-technologies