Package adams.flow.execution.debug
Class AbstractBreakpoint
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.execution.debug.AbstractBreakpoint
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
AnyActorBreakpoint
,ClassBreakpoint
,PathBreakpoint
public abstract class AbstractBreakpoint extends AbstractOptionHandler
Ancestor for breakpoints for execution listeners.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_Disabled
whether the breakpoint is disabled.protected boolean
m_OneOff
whether this is a one-off.protected boolean
m_OnPostExecute
break on postExecute.protected boolean
m_OnPostInput
break on postInput.protected boolean
m_OnPostOutput
break on postOutput.protected boolean
m_OnPreExecute
break on preExecute.protected boolean
m_OnPreInput
break on preInput.protected boolean
m_OnPreOutput
break on preOutput.protected int
m_TriggerCount
the trigger counter.protected View[]
m_Views
the views to display automatically.protected BaseString[]
m_Watches
the watch expressions.protected ExpressionWatchPanel.ExpressionType[]
m_WatchTypes
the watch expression types.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractBreakpoint()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.String
disabledTipText()
Returns the tip text for this property.protected abstract boolean
evaluatePostExecute(Actor actor)
Evaluates the breakpoint at post-execute.protected abstract boolean
evaluatePostInput(Actor actor)
Evaluates the breakpoint at post-input.protected abstract boolean
evaluatePostOutput(Actor actor, Token token)
Evaluates the breakpoint at post-output.protected abstract boolean
evaluatePreExecute(Actor actor)
Evaluates the breakpoint at pre-execute.protected abstract boolean
evaluatePreInput(Actor actor, Token token)
Evaluates the breakpoint at pre-input.protected abstract boolean
evaluatePreOutput(Actor actor)
Evaluates the breakpoint at pre-output.boolean
getDisabled()
Returns whether this breakpoint is disabled.boolean
getOneOff()
Returns whether the breakpoint is just a one-off one (gets removed once reached).boolean
getOnPostExecute()
Returns whether the breakpoint gets evaluated on post-execute.boolean
getOnPostInput()
Returns whether the breakpoint gets evaluated on post-input (of token).boolean
getOnPostOutput()
Returns whether the breakpoint gets evaluated on post-output (of token).boolean
getOnPreExecute()
Returns whether the breakpoint gets evaluated on pre-execute.boolean
getOnPreInput()
Returns whether the breakpoint gets evaluated on pre-input (of token).boolean
getOnPreOutput()
Returns whether the breakpoint gets evaluated on pre-output (of token).int
getTriggerCount()
Returns the number of times this breakpoint has been triggered.View[]
getViews()
Returns the views to display automatically.BaseString[]
getWatches()
Returns the watch expressions for the watch dialog.ExpressionWatchPanel.ExpressionType[]
getWatchTypes()
Returns the types of the watch expressions.String
oneOffTipText()
Returns the tip text for this property.String
onPostExecuteTipText()
Returns the tip text for this property.String
onPostInputTipText()
Returns the tip text for this property.String
onPostOutputTipText()
Returns the tip text for this property.String
onPreExecuteTipText()
Returns the tip text for this property.String
onPreInputTipText()
Returns the tip text for this property.String
onPreOutputTipText()
Returns the tip text for this property.protected void
reset()
Resets the scheme.void
setDisabled(boolean value)
Sets whether to disable this breakpoint.void
setOneOff(boolean value)
Sets whether the breakpoint is just a one-off one (gets removed once reached).void
setOnPostExecute(boolean value)
Sets whether to evaluate the breakpoing on post-execute.void
setOnPostInput(boolean value)
Sets whether to evaluate the breakpoing on post-input (of token).void
setOnPostOutput(boolean value)
Sets whether to evaluate the breakpoing on post-output (of token).void
setOnPreExecute(boolean value)
Sets whether to evaluate the breakpoing on pre-execute.void
setOnPreInput(boolean value)
Sets whether to evaluate the breakpoing on pre-input (of token).void
setOnPreOutput(boolean value)
Sets whether to evaluate the breakpoing on pre-output (of token).void
setViews(View[] value)
Sets the views to display automatically.void
setWatches(BaseString[] value)
Sets the watch expressions for the watch dialog.void
setWatchTypes(ExpressionWatchPanel.ExpressionType[] value)
Sets the types of the watch expressions.void
triggered()
To be called when triggered (increments counter).boolean
triggersPostExecute(Actor actor)
Checks whether the breakpoint gets triggered in post-execute.boolean
triggersPostInput(Actor actor)
Checks whether the breakpoint gets triggered in post-input.boolean
triggersPostOutput(Actor actor, Token token)
Checks whether the breakpoint gets triggered in post-output.boolean
triggersPreExecute(Actor actor)
Checks whether the breakpoint gets triggered in pre-execute.boolean
triggersPreInput(Actor actor, Token token)
Checks whether the breakpoint gets triggered in pre-input.boolean
triggersPreOutput(Actor actor)
Checks whether the breakpoint gets triggered in pre-output.String
viewsTipText()
Returns the tip text for this property.String
watchesTipText()
Returns the tip text for this property.String
watchTypesTipText()
Returns the tip text for this property.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Disabled
protected boolean m_Disabled
whether the breakpoint is disabled.
-
m_OnPreInput
protected boolean m_OnPreInput
break on preInput.
-
m_OnPostInput
protected boolean m_OnPostInput
break on postInput.
-
m_OnPreExecute
protected boolean m_OnPreExecute
break on preExecute.
-
m_OnPostExecute
protected boolean m_OnPostExecute
break on postExecute.
-
m_OnPreOutput
protected boolean m_OnPreOutput
break on preOutput.
-
m_OnPostOutput
protected boolean m_OnPostOutput
break on postOutput.
-
m_Views
protected View[] m_Views
the views to display automatically.
-
m_Watches
protected BaseString[] m_Watches
the watch expressions.
-
m_WatchTypes
protected ExpressionWatchPanel.ExpressionType[] m_WatchTypes
the watch expression types.
-
m_OneOff
protected boolean m_OneOff
whether this is a one-off.
-
m_TriggerCount
protected int m_TriggerCount
the trigger counter.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
reset
protected void reset()
Resets the scheme.- Overrides:
reset
in classAbstractOptionHandler
-
setDisabled
public void setDisabled(boolean value)
Sets whether to disable this breakpoint.- Parameters:
value
- true if to disable
-
getDisabled
public boolean getDisabled()
Returns whether this breakpoint is disabled.- Returns:
- true if disabled
-
disabledTipText
public String disabledTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOnPreInput
public void setOnPreInput(boolean value)
Sets whether to evaluate the breakpoing on pre-input (of token).- Parameters:
value
- true if evaluated
-
getOnPreInput
public boolean getOnPreInput()
Returns whether the breakpoint gets evaluated on pre-input (of token).- Returns:
- true if evaluated
-
onPreInputTipText
public String onPreInputTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOnPostInput
public void setOnPostInput(boolean value)
Sets whether to evaluate the breakpoing on post-input (of token).- Parameters:
value
- true if evaluated
-
getOnPostInput
public boolean getOnPostInput()
Returns whether the breakpoint gets evaluated on post-input (of token).- Returns:
- true if evaluated
-
onPostInputTipText
public String onPostInputTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOnPreExecute
public void setOnPreExecute(boolean value)
Sets whether to evaluate the breakpoing on pre-execute.- Parameters:
value
- true if evaluated
-
getOnPreExecute
public boolean getOnPreExecute()
Returns whether the breakpoint gets evaluated on pre-execute.- Returns:
- true if evaluated
-
onPreExecuteTipText
public String onPreExecuteTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOnPostExecute
public void setOnPostExecute(boolean value)
Sets whether to evaluate the breakpoing on post-execute.- Parameters:
value
- true if evaluated
-
getOnPostExecute
public boolean getOnPostExecute()
Returns whether the breakpoint gets evaluated on post-execute.- Returns:
- true if evaluated
-
onPostExecuteTipText
public String onPostExecuteTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOnPreOutput
public void setOnPreOutput(boolean value)
Sets whether to evaluate the breakpoing on pre-output (of token).- Parameters:
value
- true if evaluated
-
getOnPreOutput
public boolean getOnPreOutput()
Returns whether the breakpoint gets evaluated on pre-output (of token).- Returns:
- true if evaluated
-
onPreOutputTipText
public String onPreOutputTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOnPostOutput
public void setOnPostOutput(boolean value)
Sets whether to evaluate the breakpoing on post-output (of token).- Parameters:
value
- true if evaluated
-
getOnPostOutput
public boolean getOnPostOutput()
Returns whether the breakpoint gets evaluated on post-output (of token).- Returns:
- true if evaluated
-
onPostOutputTipText
public String onPostOutputTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setWatches
public void setWatches(BaseString[] value)
Sets the watch expressions for the watch dialog.- Parameters:
value
- the expressions
-
getWatches
public BaseString[] getWatches()
Returns the watch expressions for the watch dialog.- Returns:
- the expressions
-
watchesTipText
public String watchesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setWatchTypes
public void setWatchTypes(ExpressionWatchPanel.ExpressionType[] value)
Sets the types of the watch expressions.- Parameters:
value
- the types
-
getWatchTypes
public ExpressionWatchPanel.ExpressionType[] getWatchTypes()
Returns the types of the watch expressions.- Returns:
- the types
-
watchTypesTipText
public String watchTypesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setViews
public void setViews(View[] value)
Sets the views to display automatically.- Parameters:
value
- the views
-
getViews
public View[] getViews()
Returns the views to display automatically.- Returns:
- the views
-
viewsTipText
public String viewsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setOneOff
public void setOneOff(boolean value)
Sets whether the breakpoint is just a one-off one (gets removed once reached).- Parameters:
value
- true if a one-off breakpoint
-
getOneOff
public boolean getOneOff()
Returns whether the breakpoint is just a one-off one (gets removed once reached).- Returns:
- true if a one-off breakpoint
-
oneOffTipText
public String oneOffTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
evaluatePreInput
protected abstract boolean evaluatePreInput(Actor actor, Token token)
Evaluates the breakpoint at pre-input.- Parameters:
actor
- the current actortoken
- the token available for input- Returns:
- true if breakpoint triggers
-
evaluatePostInput
protected abstract boolean evaluatePostInput(Actor actor)
Evaluates the breakpoint at post-input.- Parameters:
actor
- the current actor- Returns:
- true if breakpoint triggers
-
evaluatePreExecute
protected abstract boolean evaluatePreExecute(Actor actor)
Evaluates the breakpoint at pre-execute.- Parameters:
actor
- the current actor- Returns:
- true if breakpoint triggers
-
evaluatePostExecute
protected abstract boolean evaluatePostExecute(Actor actor)
Evaluates the breakpoint at post-execute.- Parameters:
actor
- the current actor- Returns:
- true if breakpoint triggers
-
evaluatePreOutput
protected abstract boolean evaluatePreOutput(Actor actor)
Evaluates the breakpoint at pre-output.- Parameters:
actor
- the current actor- Returns:
- true if breakpoint triggers
-
evaluatePostOutput
protected abstract boolean evaluatePostOutput(Actor actor, Token token)
Evaluates the breakpoint at post-output.- Parameters:
actor
- the current actortoken
- the token available for output- Returns:
- true if breakpoint triggers
-
triggersPreInput
public boolean triggersPreInput(Actor actor, Token token)
Checks whether the breakpoint gets triggered in pre-input.- Parameters:
actor
- the current actortoken
- the token available for input- Returns:
- true if triggered
-
triggersPostInput
public boolean triggersPostInput(Actor actor)
Checks whether the breakpoint gets triggered in post-input.- Parameters:
actor
- the current actor- Returns:
- true if triggered
-
triggersPreExecute
public boolean triggersPreExecute(Actor actor)
Checks whether the breakpoint gets triggered in pre-execute.- Parameters:
actor
- the current actor- Returns:
- true if triggered
-
triggersPostExecute
public boolean triggersPostExecute(Actor actor)
Checks whether the breakpoint gets triggered in post-execute.- Parameters:
actor
- the current actor- Returns:
- true if triggered
-
triggersPreOutput
public boolean triggersPreOutput(Actor actor)
Checks whether the breakpoint gets triggered in pre-output.- Parameters:
actor
- the current actor- Returns:
- true if triggered
-
triggersPostOutput
public boolean triggersPostOutput(Actor actor, Token token)
Checks whether the breakpoint gets triggered in post-output.- Parameters:
actor
- the current actortoken
- the token available for output- Returns:
- true if triggered
-
triggered
public void triggered()
To be called when triggered (increments counter).
-
getTriggerCount
public int getTriggerCount()
Returns the number of times this breakpoint has been triggered.- Returns:
- the count
-
-