js.tinyvm
Class ConstantValue

java.lang.Object
  extended by js.tinyvm.WritableDataWithOffset
      extended by js.tinyvm.ConstantValue
All Implemented Interfaces:
WritableData

public class ConstantValue
extends WritableDataWithOffset

This class represents a constant value of a basic type.


Constructor Summary
ConstantValue(ClassRecord crec, Binary aBinary)
           
ConstantValue(org.apache.bcel.classfile.ConstantPool pool, org.apache.bcel.classfile.Constant constant, Binary aBinary)
          Constructor.
 
Method Summary
 void dump(IByteWriter writer)
          Dump.
 int getAlignment()
          Returns the ideal data alignment for this data type.
 int getLength()
          Get length in bytes of value.
 int getTypeIndex()
          Get type of this value.
 void markUsed()
           
 java.lang.Object value()
          Dereferenced value.
 
Methods inherited from class js.tinyvm.WritableDataWithOffset
getOffset, initOffset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantValue

public ConstantValue(org.apache.bcel.classfile.ConstantPool pool,
                     org.apache.bcel.classfile.Constant constant,
                     Binary aBinary)
Constructor.

Parameters:
pool - constant pool
constant - constant
aBinary -

ConstantValue

public ConstantValue(ClassRecord crec,
                     Binary aBinary)
Method Detail

value

public java.lang.Object value()
Dereferenced value.


getTypeIndex

public int getTypeIndex()
Get type of this value.


getLength

public int getLength()
Get length in bytes of value.


getAlignment

public int getAlignment()
Returns the ideal data alignment for this data type.

Returns:
the alignment in bytes.

dump

public void dump(IByteWriter writer)
          throws TinyVMException
Dump.

Parameters:
writer - byte writer
Throws:
TinyVMException

markUsed

public void markUsed()