nl.tudelft.simulation.dsol.interpreter.classfile
Class Constant

java.lang.Object
  extended by nl.tudelft.simulation.dsol.interpreter.classfile.Constant
Direct Known Subclasses:
ConstantClass, ConstantDouble, ConstantFieldref, ConstantFloat, ConstantInteger, ConstantInterfaceMethodref, ConstantLong, ConstantMethodref, ConstantNameAndType, ConstantString, ConstantUTF8

public abstract class Constant
extends Object

A Constant
(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:25:12 $
Author:
Peter Jacobs

Field Summary
protected  Constant[] constantPool
          the constantPool it is part of
 
Constructor Summary
Constant(Constant[] constantPool)
          constructs a new Constant
 
Method Summary
abstract  int getTag()
          returns the tag of the constant
static Constant readConstant(Constant[] constantPool, DataInput dataInput)
          reads a constant from the stream
static String toString(Constant[] constantPool)
          parses the constantPool to string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constantPool

protected Constant[] constantPool
the constantPool it is part of

Constructor Detail

Constant

public Constant(Constant[] constantPool)
constructs a new Constant

Parameters:
constantPool - the constantPool it is part of
Method Detail

getTag

public abstract int getTag()
returns the tag of the constant

Returns:
int the constant tag

readConstant

public static Constant readConstant(Constant[] constantPool,
                                    DataInput dataInput)
                             throws IOException
reads a constant from the stream

Parameters:
dataInput - the dataInput
constantPool - the constantPool
Returns:
Constant
Throws:
IOException - on exception

toString

public static String toString(Constant[] constantPool)
parses the constantPool to string

Parameters:
constantPool - the pool
Returns:
String


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.