org.apache.bcel.verifier.structurals

Class LocalVariables

public class LocalVariables extends Object

This class implements an array of local variables used for symbolic JVM simulation.
Constructor Summary
LocalVariables(int maxLocals)
Creates a new LocalVariables object.
Method Summary
protected Objectclone()
Returns a deep copy of this object; i.e. the clone operates on a new local variable array.
booleanequals(Object o)
Typeget(int i)
Returns the type of the local variable slot i.
LocalVariablesgetClone()
Returns a (correctly typed) clone of this object.
inthashCode()
voidinitializeObject(UninitializedObjectType u)
Replaces all occurences of u in this local variables set with an "initialized" ObjectType.
intmaxLocals()
Returns the number of local variable slots this LocalVariables instance has.
voidmerge(LocalVariables lv)
Merges two local variables sets as described in the Java Virtual Machine Specification, Second Edition, section 4.9.2, page 146.
voidset(int i, Type type)
Sets a new Type for the given local variable slot.
StringtoString()
Returns a String representation of this object.

Constructor Detail

LocalVariables

public LocalVariables(int maxLocals)
Creates a new LocalVariables object.

Method Detail

clone

protected Object clone()
Returns a deep copy of this object; i.e. the clone operates on a new local variable array. However, the Type objects in the array are shared.

equals

public boolean equals(Object o)

get

public Type get(int i)
Returns the type of the local variable slot i.

getClone

public LocalVariables getClone()
Returns a (correctly typed) clone of this object. This is equivalent to ((LocalVariables) this.clone()).

hashCode

public int hashCode()

Returns: a hash code value for the object.

initializeObject

public void initializeObject(UninitializedObjectType u)
Replaces all occurences of u in this local variables set with an "initialized" ObjectType.

maxLocals

public int maxLocals()
Returns the number of local variable slots this LocalVariables instance has.

merge

public void merge(LocalVariables lv)
Merges two local variables sets as described in the Java Virtual Machine Specification, Second Edition, section 4.9.2, page 146.

set

public void set(int i, Type type)
Sets a new Type for the given local variable slot.

toString

public String toString()
Returns a String representation of this object.