edu.umd.cs.findbugs.ba.type

Class TypeFrame

public class TypeFrame extends Frame<Type>

A specialization of Frame for determining the types of values in the Java stack frame (locals and operand stack).

Author: David Hovemeyer

See Also: Frame TypeAnalysis

Constructor Summary
TypeFrame(int numLocals)
Constructor.
Method Summary
voidclearExactSet()
Clear the exact type set.
static TypegetBottomType()
Get the single instance of the "Bottom" type.
static TypegetDoubleExtraType()
Get the single instance of the "DoubleExtra" type.
static TypegetLongExtraType()
Get the single instance of the "LongExtra" type.
static TypegetNullType()
Get the single instance of the "Null" type.
static TypegetTopType()
Get the single instance of the "Top" type.
booleanisExact(int slot)
Get whether or not a type in a given slot is exact.
voidsetExact(int slot, boolean isExact)
Set whether or not a type in a given slot is exact.

Constructor Detail

TypeFrame

public TypeFrame(int numLocals)
Constructor.

Method Detail

clearExactSet

public void clearExactSet()
Clear the exact type set. The result is that all slots will be assumed not to contain an exact type.

getBottomType

public static Type getBottomType()
Get the single instance of the "Bottom" type.

getDoubleExtraType

public static Type getDoubleExtraType()
Get the single instance of the "DoubleExtra" type.

getLongExtraType

public static Type getLongExtraType()
Get the single instance of the "LongExtra" type.

getNullType

public static Type getNullType()
Get the single instance of the "Null" type.

getTopType

public static Type getTopType()
Get the single instance of the "Top" type.

isExact

public boolean isExact(int slot)
Get whether or not a type in a given slot is exact.

Parameters: slot the slot

Returns: true if the slot contains an exact type, false if just an upper bound

setExact

public void setExact(int slot, boolean isExact)
Set whether or not a type in a given slot is exact.

Parameters: slot the slot isExact true if the slot contains an exact type, false if just an upper bound

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.