SandMark version 3.0


sandmark.util.stacksimulator
Class ArrayReferenceData

java.lang.Object
  |
  +--sandmark.util.stacksimulator.StackData
        |
        +--sandmark.util.stacksimulator.ReferenceData
              |
              +--sandmark.util.stacksimulator.ArrayReferenceData

class ArrayReferenceData
extends ReferenceData


Constructor Summary
ArrayReferenceData(de.fub.bytecode.generic.ReferenceType ref, de.fub.bytecode.generic.InstructionHandle h, PrimitiveData length)
           
ArrayReferenceData(de.fub.bytecode.generic.ReferenceType ref, int length, de.fub.bytecode.generic.InstructionHandle h)
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Tests for equality between any two data elements.
 int getLength()
          Returns the length of this array if defined.
(package private)  PrimitiveData getLengthData()
           
 int getSize()
          Specifies the size of this object on the operand stack.
 de.fub.bytecode.generic.Type getType()
          Specifies the type of the data.
 java.lang.String toString()
           
 StackData undefinedVersion()
          Returns the same type of stack data as this instance, without any definition.
 
Methods inherited from class sandmark.util.stacksimulator.StackData
getInstruction
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArrayReferenceData

public ArrayReferenceData(de.fub.bytecode.generic.ReferenceType ref,
                          de.fub.bytecode.generic.InstructionHandle h,
                          PrimitiveData length)

ArrayReferenceData

public ArrayReferenceData(de.fub.bytecode.generic.ReferenceType ref,
                          int length,
                          de.fub.bytecode.generic.InstructionHandle h)
Method Detail

getLength

public int getLength()
Returns the length of this array if defined.

Returns:
the array length, else a negative value

getLengthData

PrimitiveData getLengthData()

toString

public java.lang.String toString()
Overrides:
toString in class ReferenceData

equals

public boolean equals(java.lang.Object o)
Description copied from class: StackData
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 ReferenceData
Parameters:
o - the object to test equality against

getSize

public int getSize()
Description copied from class: StackData
Specifies the size of this object on the operand stack.

Specified by:
getSize in class StackData
Returns:
the size of the object in bytes, 1 or 2.

getType

public de.fub.bytecode.generic.Type getType()
Description copied from class: StackData
Specifies the type of the data.

Specified by:
getType in class StackData
Returns:
a type object which is the type (or a superclass of the type) for the data object

undefinedVersion

public StackData undefinedVersion()
Description copied from class: StackData
Returns the same type of stack data as this instance, without any definition. For example, an IntData object would return a new IntData object that has undefined value when undefinedVersion is called.

Specified by:
undefinedVersion in class StackData
Returns:
A similar instance to this object, with no definition data

SandMark version 3.0

Wed Jan 29 10:30:05 MST 2003