org.apache.commons.javaflow.bytecode.transformation.bcel.analyser
Class LocalVariables

java.lang.Object
  extended by org.apache.commons.javaflow.bytecode.transformation.bcel.analyser.LocalVariables

public class LocalVariables
extends java.lang.Object

This class implements an array of local variables used for symbolic JVM simulation. WARNING! These classes are a fork of the bcel verifier.

Version:
$Id: LocalVariables.java 480487 2006-11-29 08:54:42Z bayard $
Author:
Enver Haase

Constructor Summary
LocalVariables(int maxLocals)
          Creates a new LocalVariables object.
 
Method Summary
protected  java.lang.Object clone()
          Returns a deep copy of this object; i.e.
 boolean equals(java.lang.Object o)
           
 org.apache.bcel.generic.Type get(int i)
          Returns the type of the local variable slot i.
 LocalVariables getClone()
          Returns a (correctly typed) clone of this object.
 void initializeObject(UninitializedObjectType u)
          Replaces all occurences of u in this local variables set with an "initialized" ObjectType.
 int maxLocals()
          Returns the number of local variable slots this LocalVariables instance has.
 void merge(LocalVariables that)
          Merges two local variables sets as described in the Java Virtual Machine Specification, Second Edition, section 4.9.2, page 146.
 void set(int i, org.apache.bcel.generic.Type type)
          Sets a new Type for the given local variable slot.
 java.lang.String toString()
          Returns a String representation of this object.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalVariables

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

Method Detail

clone

protected java.lang.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.

Overrides:
clone in class java.lang.Object

get

public org.apache.bcel.generic.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()).


maxLocals

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


set

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


equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

merge

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


toString

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

Overrides:
toString in class java.lang.Object

initializeObject

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



Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.