public abstract class AbstractHitCountBreakpoint extends AbstractBreakpoint
AbstractBreakpoint
.Modifier and Type | Field and Description |
---|---|
private int |
hitCount
The HitCount of the Breakpoint (set by user).
|
private int |
hitted
Counter for how often the Breakpoint was hit.
|
private java.util.Map<java.lang.Integer,java.lang.Boolean> |
hittedNodes
Map to save the nodes that already have been reached, so nodes are not counted twice for the hitcount
|
Constructor and Description |
---|
AbstractHitCountBreakpoint(int hitCount,
Proof proof,
boolean enabled)
Creates a new
AbstractHitCountBreakpoint . |
Modifier and Type | Method and Description |
---|---|
int |
getHitCount()
Returns the hitCount of the associated Breakpoint.
|
protected boolean |
hitcountExceeded(Node node)
Checks if the Hitcount is exceeded for the given
JavaLineBreakpoint . |
boolean |
isBreakpointHit(SourceElement activeStatement,
RuleApp ruleApp,
Proof proof,
Node node)
Determines if the breakpoint represented by this BreakpointStopConition is triggered.
|
void |
setHitCount(int hitCount)
Set the hitCount to the new value
|
getProof, isEnabled, setEnabled, updateState
private int hitCount
private int hitted
private final java.util.Map<java.lang.Integer,java.lang.Boolean> hittedNodes
public AbstractHitCountBreakpoint(int hitCount, Proof proof, boolean enabled)
AbstractHitCountBreakpoint
.hitCount
- the number of hits after which the execution should hold at this breakpointproof
- the Proof
that will be executed and should stopenabled
- flag if the Breakpoint is enabledprotected boolean hitcountExceeded(Node node)
JavaLineBreakpoint
.
If the Hitcount is not exceeded the hitted counter is incremented, otherwise its set to 0.JavaLineBreakpoint
has no Hitcount.public boolean isBreakpointHit(SourceElement activeStatement, RuleApp ruleApp, Proof proof, Node node)
activeStatement
- the activeStatement of the noderuleApp
- the applied RuleApp
proof
- the current proofnode
- the current nodepublic int getHitCount()
public void setHitCount(int hitCount)
hitCount
- the new value