edu.umd.cs.findbugs.ba.type
public class TypeFrameModelingVisitor extends AbstractFrameModelingVisitor<Type,TypeFrame> implements Constants, Debug
See Also: TypeFrame TypeAnalysis
Constructor Summary | |
---|---|
TypeFrameModelingVisitor(ConstantPoolGen cpg)
Constructor.
|
Method Summary | |
---|---|
protected void | consumeStack(Instruction ins)
Consume stack. |
Type | getInstanceOfType()
Get the type of the most recent instanceof instruction modeled.
|
ValueNumber | getInstanceOfValueNumber()
Get the value number of the most recent instanceof instruction modeled.
|
short | getLastOpcode()
Get the last opcode analyzed by this visitor.
|
boolean | isInstanceOfFollowedByBranch()
Return whether an instanceof instruction was followed by a branch.
|
void | modelFieldLoad(FieldInstruction obj) |
protected void | pushReturnType(InvokeInstruction ins)
Helper for pushing the return type of an invoke instruction. |
protected void | pushValue(Type type)
Work around some weirdness in BCEL (inherited from JVM Spec 1):
BCEL considers long and double types to consume two slots on the
stack. |
void | setFieldStoreTypeDatabase(FieldStoreTypeDatabase database)
Set the field store type database.
|
void | setValueNumberDataflow(ValueNumberDataflow valueNumberDataflow)
Set ValueNumberDataflow for the method being analyzed.
|
void | startBasicBlock()
This method must be called at the beginning of modeling
a basic block in order to clear information cached
for instanceof modeling. |
Parameters: cpg the ConstantPoolGen of the method whose instructions we are examining
Returns: the Type checked by the most recent instanceof instruction
Returns: the ValueNumber checked by the most recent instanceof instruction
Returns: the last opcode analyzed by this visitor
Returns: true if an instanceof instruction was followed by a branch, false if not
Parameters: database the FieldStoreTypeDatabase
Parameters: valueNumberDataflow the ValueNumberDataflow