SandMark version 2.1


sandmark.util.stacksimulator
Class StackData

java.lang.Object
  |
  +--sandmark.util.stacksimulator.StackData
Direct Known Subclasses:
PrimitiveData, ReferenceData

public abstract class StackData
extends java.lang.Object

StackData is the superclass of all first class data elements.

Author:
Kelly Heffner (kheffner@cs.arizona.edu)

Constructor Summary
protected StackData(de.fub.bytecode.generic.InstructionHandle h)
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Tests for equality between any two data elements.
 de.fub.bytecode.generic.InstructionHandle getInstruction()
          Specifies the instruction handle for the instruction that placed this object on the stack.
abstract  int getSize()
          Specifies the size of this object on the operand stack.
abstract  de.fub.bytecode.generic.Type getType()
          Specifies the type of the data.
abstract  StackData undefinedVersion()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackData

protected StackData(de.fub.bytecode.generic.InstructionHandle h)
Method Detail

getSize

public abstract int getSize()
Specifies the size of this object on the operand stack.

Returns:
the size of the object in bytes, 1 or 2.

getType

public abstract de.fub.bytecode.generic.Type getType()
Specifies the type of the data.

Returns:
a type object which is the type (or a superclass of the type) for the data object

equals

public boolean equals(java.lang.Object o)
Tests for equality between any two data elements. Two StackData objects are equal iff they have the same instruction handle as their creation point. (subclasses have more restrictions for equality)

Overrides:
equals in class java.lang.Object
Parameters:
o - the object to test equality against
Throws:
java.lang.ClassCastException - if o is not an instance of StackData

getInstruction

public de.fub.bytecode.generic.InstructionHandle getInstruction()
Specifies the instruction handle for the instruction that placed this object on the stack.


undefinedVersion

public abstract StackData undefinedVersion()

SandMark version 2.1

Wed Jul 3 17:27:43 MST 2002