public class MethodBreakpoint extends AbstractConditionalBreakpoint
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
classPath
The path of the class this
LineBreakpoint is associated with. |
private boolean |
isEntry
flag to tell whether to stop on method entry
|
private boolean |
isExit
flag to tell whether to stop on method exit
|
protected int |
methodEnd
The end of the method containing the associated Breakpoint
|
protected int |
methodStart
The start of the method containing the associated Breakpoint
|
Constructor and Description |
---|
MethodBreakpoint(java.lang.String classPath,
int lineNumber,
int hitCount,
IProgramMethod pm,
Proof proof,
java.lang.String condition,
boolean enabled,
boolean conditionEnabled,
int methodStart,
int methodEnd,
boolean isEntry,
boolean isExit)
Creates a new
LineBreakpoint . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getClassPath() |
protected StatementBlock |
getStatementBlock(StatementContainer statementContainer)
For a given
StatementContainer this method computes the StatementBlock that contains all lines before the line the Breakpoint is at, including the line itself. |
boolean |
isBreakpointHit(SourceElement activeStatement,
RuleApp ruleApp,
Proof proof,
Node node)
Determines if the breakpoint represented by this BreakpointStopConition is triggered.
|
private boolean |
isCorrectMethodReturn(Node node,
RuleApp ruleApp) |
boolean |
isEntry() |
boolean |
isExit() |
protected boolean |
isInScope(Node node)
Checks if the statement of a given
Node is in the scope of this breakpoint. |
protected boolean |
isInScopeForCondition(Node node)
Checks if the statement of a given
Node is in the scope of this breakpoint. |
private boolean |
isMethodCallNode(Node node,
RuleApp ruleApp) |
private boolean |
isMethodReturnNode(Node node,
RuleApp ruleApp) |
void |
setClassPath(java.lang.String classPath) |
void |
setEntry(boolean isEntry) |
void |
setExit(boolean isExit) |
conditionMet, getCondition, getConditionString, getPm, getSelfVar, getToKeep, getVariableNamingMap, getVarsForCondition, isConditionEnabled, refreshVarMaps, setCondition, setConditionEnabled, setPm, setSelfVar, setVariableNamingMap, setVarsForCondition, updateState
getHitCount, hitcountExceeded, setHitCount
getProof, isEnabled, setEnabled
private boolean isEntry
private boolean isExit
protected int methodStart
protected int methodEnd
private java.lang.String classPath
LineBreakpoint
is associated with.public MethodBreakpoint(java.lang.String classPath, int lineNumber, int hitCount, IProgramMethod pm, Proof proof, java.lang.String condition, boolean enabled, boolean conditionEnabled, int methodStart, int methodEnd, boolean isEntry, boolean isExit) throws SLTranslationException
LineBreakpoint
.classPath
- the path of the class the associated Breakpoint lies withinlineNumber
- the line where the associated Breakpoint is located in the classhitCount
- the number of hits after which the execution should hold at this breakpointpm
- the IProgramMethod
representing the Method which the Breakpoint is located atproof
- the Proof
that will be executed and should stopcondition
- the condition as given by the userenabled
- flag if the Breakpoint is enabledconditionEnabled
- flag if the condition is enabledmethodStart
- the line the containing method of this breakpoint starts atmethodEnd
- the line the containing method of this breakpoint ends atcontainerType
- the type of the element containing the breakpointisEntry
- flag to tell whether to stop on method entryisExit
- flag to tell whether to stop on method exitSLTranslationException
- if the condition could not be parsed to a valid Termpublic boolean isBreakpointHit(SourceElement activeStatement, RuleApp ruleApp, Proof proof, Node node)
AbstractConditionalBreakpoint
isBreakpointHit
in interface IBreakpoint
isBreakpointHit
in class AbstractConditionalBreakpoint
activeStatement
- the activeStatement of the noderuleApp
- the applied RuleApp
proof
- the current proofnode
- the current nodeprivate boolean isMethodCallNode(Node node, RuleApp ruleApp)
node
- to checkruleApp
- the applied rule appprivate boolean isMethodReturnNode(Node node, RuleApp ruleApp)
node
- to checkruleApp
- the applied rule appprotected StatementBlock getStatementBlock(StatementContainer statementContainer)
AbstractConditionalBreakpoint
StatementContainer
this method computes the StatementBlock
that contains all lines before the line the Breakpoint is at, including the line itself.getStatementBlock
in class AbstractConditionalBreakpoint
statementContainer
- the StatementContainer
to build the block fromStatementBlock
representing the container without the line below the Breakpointpublic boolean isEntry()
public void setEntry(boolean isEntry)
public boolean isExit()
public void setExit(boolean isExit)
protected boolean isInScope(Node node)
AbstractConditionalBreakpoint
Node
is in the scope of this breakpoint.isInScope
in class AbstractConditionalBreakpoint
node
- the Node
to be checkedprotected boolean isInScopeForCondition(Node node)
AbstractConditionalBreakpoint
Node
is in the scope of this breakpoint.isInScopeForCondition
in class AbstractConditionalBreakpoint
node
- the Node
to be checkedpublic java.lang.String getClassPath()
public void setClassPath(java.lang.String classPath)
classPath
- the classPath to set