edu.umd.cs.findbugs.ba
public class BlockType extends BitSet
If valid (isValid() returns true), a BlockType value is a stack of elements, which are either CATCH or FINALLY values. Call getDepth() to get the current nesting depth. Call get(int n) to get the nth stack item. Call getTopValue() to get the current top of the stack.
If invalid (isValid() returns false), a BlockType value is either top or bottom. These are the special values at the top and bottom of the dataflow lattice.
The dataflow lattice is effectively finite-height because real Java methods are guarnateed to have a finite catch and finally block nesting level.
See Also: BlockTypeAnalysis
Field Summary | |
---|---|
static boolean | CATCH |
static boolean | FINALLY |
Method Summary | |
---|---|
void | copyFrom(BlockType other)
Make this object an exact duplicate of given object.
|
int | getDepth()
Get the current nesting depth.
|
boolean | getTopValue()
Get the top value on the catch and finally block nesting stack. |
boolean | isBottom()
Return whether or not this is the special "bottom" dataflow value. |
boolean | isNormal()
Return whether or not this value represents "normal" control-flow.
|
boolean | isTop()
Return whether or not this is the special "top" dataflow value. |
boolean | isValid()
Return whether or not this value is valid,
meaning it contains a valid representation of the
nesting of catch and finally blocks. |
void | mergeWith(BlockType other)
Merge other dataflow value into this value.
|
void | pushCatch()
Enter a catch block. |
void | pushFinally()
Enter a finally block. |
boolean | sameAs(BlockType other)
Return whether or not this object is identical to the one given.
|
void | setBottom()
Make this the special "bottom" dataflow value. |
void | setNormal()
Make this value represent "normal" control flow. |
void | setTop()
Make this the special "top" dataflow value. |
Parameters: other the other BlockType object
Parameters: other the other BlockType value
Parameters: other the other BlockType object
Returns: true if this object is identical to the one given, false otherwise