|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.ba.ExceptionSet
public class ExceptionSet
Class for keeping track of exceptions that can be thrown by an instruction. We distinguish explicit and implicit exceptions. Explicit exceptions are explicitly declared, thrown, or caught. Implicit exceptions are runtime faults (NPE, array out of bounds) not explicitly handled by the user code.
TypeAnalysis
,
Serialized FormNested Class Summary | |
---|---|
class |
ExceptionSet.ThrownExceptionIterator
Object to iterate over the exception types in the set. |
Field Summary | |
---|---|
private org.apache.bcel.generic.Type |
commonSupertype
|
private java.util.BitSet |
exceptionSet
|
private java.util.BitSet |
explicitSet
|
private ExceptionSetFactory |
factory
|
private int |
size
|
private boolean |
universalHandler
|
Constructor Summary | |
---|---|
ExceptionSet(ExceptionSetFactory factory)
Constructor. |
Method Summary | |
---|---|
void |
add(org.apache.bcel.generic.ObjectType type,
boolean explicit)
Add an exception. |
void |
addAll(ExceptionSet other)
Add all exceptions in the given set. |
void |
addExplicit(org.apache.bcel.generic.ObjectType type)
Add an explicit exception. |
void |
addImplicit(org.apache.bcel.generic.ObjectType type)
Add an implicit exception. |
void |
clear()
Remove all exceptions from the set. |
boolean |
containsCheckedExceptions()
Return whether or not the set contains any checked exceptions. |
boolean |
containsExplicitExceptions()
Return whether or not the set contains any explicit exceptions. |
private int |
countBits(java.util.BitSet bitSet)
|
ExceptionSet |
duplicate()
Return an exact copy of this object. |
boolean |
equals(java.lang.Object o)
|
org.apache.bcel.generic.Type |
getCommonSupertype()
Get the least (lowest in the lattice) common supertype of the exceptions in the set. |
int |
hashCode()
|
boolean |
isEmpty()
Return whether or not the set is empty. |
ExceptionSet.ThrownExceptionIterator |
iterator()
Return an iterator over thrown exceptions. |
void |
sawUniversal()
Return whether or not a universal exception handler was reached by the set. |
boolean |
sawUniversalHandler()
Mark the set as having reached a universal exception handler. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private ExceptionSetFactory factory
private java.util.BitSet exceptionSet
private java.util.BitSet explicitSet
private int size
private boolean universalHandler
private org.apache.bcel.generic.Type commonSupertype
Constructor Detail |
---|
ExceptionSet(ExceptionSetFactory factory)
Method Detail |
---|
public ExceptionSet duplicate()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public org.apache.bcel.generic.Type getCommonSupertype() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public ExceptionSet.ThrownExceptionIterator iterator()
public boolean isEmpty()
public void addExplicit(org.apache.bcel.generic.ObjectType type)
type
- type of the exceptionpublic void addImplicit(org.apache.bcel.generic.ObjectType type)
type
- type of the exceptionpublic void add(org.apache.bcel.generic.ObjectType type, boolean explicit)
type
- the exception typeexplicit
- true if the exception is explicitly declared
or thrown, false if implicitpublic void addAll(ExceptionSet other)
other
- the setprivate int countBits(java.util.BitSet bitSet)
public void clear()
public void sawUniversal()
public boolean sawUniversalHandler()
public boolean containsCheckedExceptions() throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public boolean containsExplicitExceptions()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |