org.apache.bcel.verifier.statics

Class LocalVariablesInfo

public class LocalVariablesInfo extends Object

A utility class holding the information about the names and the types of the local variables in a given method.

Version: $Id: LocalVariablesInfo.java 386056 2006-03-15 11:31:56Z tcurdt $

Author: Enver Haase

Field Summary
LocalVariableInfo[]localVariableInfos
The information about the local variables is stored here.
Constructor Summary
LocalVariablesInfo(int max_locals)
The constructor.
Method Summary
voidadd(int slot, String name, int startpc, int length, Type t)
Adds information about the local variable in slot 'slot'.
LocalVariableInfogetLocalVariableInfo(int slot)
Returns the LocalVariableInfo for the given slot.

Field Detail

localVariableInfos

private LocalVariableInfo[] localVariableInfos
The information about the local variables is stored here.

Constructor Detail

LocalVariablesInfo

LocalVariablesInfo(int max_locals)
The constructor.

Method Detail

add

public void add(int slot, String name, int startpc, int length, Type t)
Adds information about the local variable in slot 'slot'. Automatically adds information for slot+1 if 't' is Type.LONG or Type.DOUBLE.

Throws: LocalVariableInfoInconsistentException if the new information conflicts with already gathered information.

getLocalVariableInfo

public LocalVariableInfo getLocalVariableInfo(int slot)
Returns the LocalVariableInfo for the given slot.