|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.BitSet
edu.umd.cs.findbugs.ba.BlockType
public class BlockType
Dataflow value representing the current nesting of catch and finally blocks. We assume that any catch block with a non-empty catch type is a user catch block, and any catch block with an empty catch type (i.e., catch all exceptions) is a finally block. This assumption isn't quite accurate, but it seems to be a reasonable first approximation.
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 guaranteed to have a finite catch and finally block nesting level.
BlockTypeAnalysis
,
Serialized FormField Summary | |
---|---|
static boolean |
CATCH
|
static boolean |
FINALLY
|
Method Summary | |
---|---|
void |
copyFrom(BlockType other)
Make this object an exact duplicate of given object. |
boolean |
equals(java.lang.Object obj)
|
int |
getDepth()
Get the current nesting depth. |
boolean |
getTopValue()
Get the top value on the catch and finally block nesting stack. |
int |
hashCode()
|
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. |
java.lang.String |
toString()
|
Methods inherited from class java.util.BitSet |
---|
and, andNot, cardinality, clear, clear, clear, clone, flip, flip, get, get, intersects, isEmpty, length, nextClearBit, nextSetBit, or, set, set, set, set, size, xor |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean CATCH
public static final boolean FINALLY
Method Detail |
---|
public int hashCode()
hashCode
in class java.util.BitSet
public boolean equals(java.lang.Object obj)
equals
in class java.util.BitSet
public boolean isValid()
public int getDepth()
public boolean getTopValue()
public boolean isNormal()
public void setNormal()
public boolean isTop()
public void setTop()
public boolean isBottom()
public void setBottom()
public void copyFrom(BlockType other)
other
- the other BlockType objectpublic boolean sameAs(BlockType other)
other
- the other BlockType object
public void mergeWith(BlockType other)
other
- the other BlockType valuepublic void pushCatch()
public void pushFinally()
public java.lang.String toString()
toString
in class java.util.BitSet
|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |