Package adams.flow.control
Class Breakpoint
-
- All Implemented Interfaces:
AdditionalInformationHandler
,CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,ShallowCopySupporter<Actor>
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,VariablesInspectionHandler
,VariableChangeListener
,BooleanConditionSupporter
,Actor
,ControlActor
,ErrorHandler
,InputConsumer
,OutputProducer
,Serializable
,Comparable
public class Breakpoint extends AbstractTransformer implements ControlActor, BooleanConditionSupporter
Allows to pause the execution of the flow when this actor is reached and the condition evaluates to 'true'.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-name <java.lang.String> (property: name) The name of the actor. default: Breakpoint
-annotation <adams.core.base.BaseAnnotation> (property: annotations) The annotations to attach to this actor. default:
-skip <boolean> (property: skip) If set to true, transformation is skipped and the input token is just forwarded as it is. default: false
-stop-flow-on-error <boolean> (property: stopFlowOnError) If set to true, the flow gets stopped in case this actor encounters an error; useful for critical actors. default: false
-silent <boolean> (property: silent) If enabled, then no errors are output in the console; Note: the enclosing actor handler must have this enabled as well. default: false
-scope-restriction <adams.flow.execution.debug.AbstractScopeRestriction> (property: scopeRestriction) The scopeRestriction to use for suspending the flow execution. default: adams.flow.execution.debug.NoScopeRestriction
-on-pre-input <boolean> (property: onPreInput) If set to true, the breakpoint gets evaluated at pre-input (of token) time; token available. default: false
-on-post-input <boolean> (property: onPostInput) If set to true, the breakpoint gets evaluated at post-input (of token) time. default: false
-on-pre-execute <boolean> (property: onPreExecute) If set to true, the breakpoint gets evaluated at pre-execute time. default: true
-on-post-execute <boolean> (property: onPostExecute) If set to true, the breakpoint gets evaluated at post-execute time. default: false
-on-pre-output <boolean> (property: onPreOutput) If set to true, the breakpoint gets evaluated at pre-output (of token) time; token available. default: false
-on-post-output <boolean> (property: onPostOutput) If set to true, the breakpoint gets evaluated at post-output (of token) time. default: false
-condition <adams.flow.condition.bool.BooleanCondition> (property: condition) The condition to evaluate; if the condition evaluates to 'true', the execution of the flow is paused. default: adams.flow.condition.bool.Expression
-watch <adams.core.base.BaseString> [-watch ...] (property: watches) The expression to display initially in the watch dialog; the type of the watch needs to be specified as well. default:
-watch-type <VARIABLE|BOOLEAN|NUMERIC|STRING> [-watch-type ...] (property: watchTypes) The types of the watch expressions; determines how the expressions get evaluated and displayed. default:
-view <SOURCE|EXPRESSIONS|VARIABLES|STORAGE|INSPECT_TOKEN|BREAKPOINTS> [-view ...] (property: views) The views to display automatically when the breakpoint is reached. default:
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BooleanCondition
m_Condition
the condition to evaluate.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 AbstractScopeRestriction
m_ScopeRestriction
the scope restriction to use.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.flow.transformer.AbstractTransformer
BACKUP_INPUT, BACKUP_OUTPUT, m_InputToken, m_OutputToken
-
Fields inherited from class adams.flow.core.AbstractActor
m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_ExecutionListeningSupporter, m_FullName, m_LoggingPrefix, m_Name, m_Parent, m_ScopeHandler, m_Self, m_Silent, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
Fields inherited from interface adams.flow.core.Actor
FILE_EXTENSION, FILE_EXTENSION_GZ
-
-
Constructor Summary
Constructors Constructor Description Breakpoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class[]
accepts()
Returns the class that the consumer accepts.String
conditionTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected String
doExecute()
Executes the flow item.Class[]
generates()
Returns the class of objects that it generates.BooleanCondition
getCondition()
Returns the break condition to evaluate.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).String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.AbstractScopeRestriction
getScopeRestriction()
Returns the restriction for the scope to use for suspending the flow execution.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
globalInfo()
Returns a string describing the object.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.String
scopeRestrictionTipText()
Returns the tip text for this property.void
setCondition(BooleanCondition value)
Sets the break condition to evaluate.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
setScopeRestriction(AbstractScopeRestriction value)
Sets the restriction for the scope to use for suspending the flow execution.String
setUp()
Initializes the item for flow execution.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.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.flow.transformer.AbstractTransformer
backupState, currentInput, execute, hasInput, hasPendingOutput, input, output, postExecute, restoreState, wrapUp
-
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, canInspectOptions, canPerformSetUpCheck, cleanUp, compareTo, configureLogger, destroy, equals, finalUpdateVariables, findVariables, findVariables, forceVariables, forCommandLine, forName, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, handleException, hasErrorHandler, hasStopMessage, index, initialize, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, performVariableChecks, preExecute, pruneBackup, pruneBackup, reset, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setVariables, shallowCopy, shallowCopy, silentTipText, sizeOf, skipTipText, stopExecution, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.flow.core.Actor
cleanUp, compareTo, destroy, equals, execute, findVariables, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isHeadless, isStopped, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setVariables, shallowCopy, shallowCopy, sizeOf, stopExecution, stopExecution, toCommandLine, variableChanged, wrapUp
-
Methods inherited from interface adams.core.AdditionalInformationHandler
getAdditionalInformation
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager
-
Methods inherited from interface adams.core.VariablesInspectionHandler
canInspectOptions
-
-
-
-
Field Detail
-
m_ScopeRestriction
protected AbstractScopeRestriction m_ScopeRestriction
the scope restriction to use.
-
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_Condition
protected BooleanCondition m_Condition
the condition to evaluate.
-
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.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractActor
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceActor
- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractActor
- Returns:
- null if no info available, otherwise short string
-
setScopeRestriction
public void setScopeRestriction(AbstractScopeRestriction value)
Sets the restriction for the scope to use for suspending the flow execution.- Parameters:
value
- the restriction
-
getScopeRestriction
public AbstractScopeRestriction getScopeRestriction()
Returns the restriction for the scope to use for suspending the flow execution.- Returns:
- the restriction
-
scopeRestrictionTipText
public String scopeRestrictionTipText()
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.
-
setCondition
public void setCondition(BooleanCondition value)
Sets the break condition to evaluate.- Specified by:
setCondition
in interfaceBooleanConditionSupporter
- Parameters:
value
- the expression
-
getCondition
public BooleanCondition getCondition()
Returns the break condition to evaluate.- Specified by:
getCondition
in interfaceBooleanConditionSupporter
- Returns:
- the expression
-
conditionTipText
public String conditionTipText()
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.
-
setUp
public String setUp()
Initializes the item for flow execution.- Specified by:
setUp
in interfaceActor
- Overrides:
setUp
in classAbstractActor
- Returns:
- null if everything is fine, otherwise error message
- See Also:
AbstractActor.reset()
-
accepts
public Class[] accepts()
Returns the class that the consumer accepts.- Specified by:
accepts
in interfaceInputConsumer
- Returns:
- adams.flow.core.Unknown.class
-
generates
public Class[] generates()
Returns the class of objects that it generates.- Specified by:
generates
in interfaceOutputProducer
- Returns:
- adams.flow.core.Unknown.class
-
doExecute
protected String doExecute()
Executes the flow item.- Specified by:
doExecute
in classAbstractActor
- Returns:
- null if everything is fine, otherwise error message
-
-