public class ExceptionBreakpoint extends AbstractHitCountBreakpoint
ExceptionBreakpoint
represents an exception breakpoint and is responsible to tell the debugger to stop execution when the respective
breakpoint is hit.Modifier and Type | Field and Description |
---|---|
private boolean |
caught
a flag whether to watch for an uncaught exception
|
private java.lang.String |
exceptionName
The exception to watch for
|
private java.util.Set<Node> |
exceptionParentNodes
a list of nodes of the Symbolic Execution Tree whose children represent exceptions
|
private boolean |
suspendOnSubclasses
a flag whether to suspend on subclasses of the exception aswell
|
private boolean |
uncaught
a flag to tell whether to stop at uncaught exceptions or not
|
Constructor and Description |
---|
ExceptionBreakpoint(Proof proof,
java.lang.String exceptionName,
boolean caught,
boolean uncaught,
boolean suspendOnSubclasses,
boolean enabled,
int hitCount)
Creates a new
AbstractHitCountBreakpoint . |
Modifier and Type | Method and Description |
---|---|
boolean |
isBreakpointHit(SourceElement activeStatement,
RuleApp ruleApp,
Proof proof,
Node node)
Determines if the breakpoint represented by this BreakpointStopConition is triggered.
|
boolean |
isCaught() |
boolean |
isParentNode(Node node,
Node parent)
Checks if the given node is a parent of the other given node.
|
boolean |
isSuspendOnSubclasses() |
boolean |
isUncaught() |
void |
setCaught(boolean isCaught) |
void |
setSuspendOnSubclasses(boolean suspendOnSubclasses) |
void |
setUncaught(boolean isUncaught) |
getHitCount, hitcountExceeded, setHitCount
getProof, isEnabled, setEnabled, updateState
private java.lang.String exceptionName
private java.util.Set<Node> exceptionParentNodes
private boolean caught
private boolean suspendOnSubclasses
private boolean uncaught
public ExceptionBreakpoint(Proof proof, java.lang.String exceptionName, boolean caught, boolean uncaught, boolean suspendOnSubclasses, boolean enabled, int hitCount)
AbstractHitCountBreakpoint
.proof
- the Proof
that will be executed and should stopexceptionName
- the name of the exception to watch forcaught
- flag to tell if caught exceptions lead to a stopuncaught
- flag to tell if uncaught exceptions lead to a stopsuspendOnSubclasses
- flag to tell if the execution should suspend on subclasses of the exception aswellenabled
- flag if the Breakpoint is enabledhitCount
- the number of hits after which the execution should hold at this breakpointpublic boolean isParentNode(Node node, Node parent)
public boolean isBreakpointHit(SourceElement activeStatement, RuleApp ruleApp, Proof proof, Node node)
isBreakpointHit
in interface IBreakpoint
isBreakpointHit
in class AbstractHitCountBreakpoint
activeStatement
- the activeStatement of the noderuleApp
- the applied RuleApp
proof
- the current proofnode
- the current nodepublic boolean isCaught()
public void setCaught(boolean isCaught)
isCaught
- the isCaught to setpublic boolean isUncaught()
public void setUncaught(boolean isUncaught)
isUncaught
- the isUncaught to setpublic boolean isSuspendOnSubclasses()
public void setSuspendOnSubclasses(boolean suspendOnSubclasses)
suspendOnSubclasses
- the suspendOnSubclasses to set