Top Description Fields Constructors Methods
org.apache.bcel.verifier.statics

public Class LocalVariablesInfo

extends Object
Class Inheritance
Imports
java.util.Arrays, org.apache.bcel.generic.Type, org.apache.bcel.verifier.exc.AssertionViolatedException, .LocalVariableInfoInconsistentException

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

Field Summary

Modifier and TypeField and Description
private final LocalVariableInfo[]
localVariableInfos

The information about the local variables is stored here.

Constructor Summary

AccessConstructor and Description
pack-priv
LocalVariablesInfo(final int maxLocals)

The constructor.

Method Summary

Modifier and TypeMethod and Description
public void
add(final int
Slot number for local variable information
slot
,
final String
variable name
name
,
final int
Range in which the variable is valid.
startPc
,
final int
length of ...
length
,
final Type
variable type
type
)

Adds information about the local variable in slot 'slot'.

public LocalVariableInfo

Returns:

The LocalVariableInfo for the given slot.
getLocalVariableInfo
(final int
Slot to query.
slot
)

Returns the LocalVariableInfo for the given slot.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

localVariableInfosback to summary
private final LocalVariableInfo[] localVariableInfos

The information about the local variables is stored here.

Constructor Detail

LocalVariablesInfoback to summary
pack-priv LocalVariablesInfo(final int maxLocals)

The constructor.

Method Detail

addback to summary
public void add(final int slot, final String name, final int startPc, final int length, final Type type) throws LocalVariableInfoInconsistentException

Adds information about the local variable in slot 'slot'. Automatically adds information for slot+1 if 't' is Type.LONG or Type.DOUBLE.

Parameters
slot:int

Slot number for local variable information

name:String

variable name

startPc:int

Range in which the variable is valid.

length:int

length of ...

type:Type

variable type

Exceptions
LocalVariableInfoInconsistentException:
if the new information conflicts with already gathered information.
getLocalVariableInfoback to summary
public LocalVariableInfo getLocalVariableInfo(final int slot)

Returns the LocalVariableInfo for the given slot.

Parameters
slot:int

Slot to query.

Returns:LocalVariableInfo

The LocalVariableInfo for the given slot.