Class Groovy

  • All Implemented Interfaces:
    CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, FileBasedScripting, FileBasedScriptingWithOptions, ShallowCopySupporter<AbstractActorTemplate>, SizeOfHandler, Serializable

    public class Groovy
    extends AbstractScriptedTemplate
    Uses a Groovy script to generate a sub-flow.

    Valid options are:

    -D <int> (property: debugLevel)
        The greater the number the more additional info the scheme may output to 
        the console (0 = off).
        default: 0
        minimum: 0
     
    -name <java.lang.String> (property: name)
        The new name for the actor; leave empty to use current.
        default: 
     
    -script <adams.core.io.PlaceholderFile> (property: scriptFile)
        The script file to load and execute.
        default: ${CWD}
     
    -options <java.lang.String> (property: scriptOptions)
        The options for the Groovy script; must consist of 'key=value' pairs separated 
        by blanks; the value of 'key' can be accessed via the 'getAdditionalOptions
        ().getXYZ("key")' method in the Groovy actor.
        default: 
     
    -inline-script <adams.core.scripting.GroovyScript> (property: inlineScript)
        The inline script, if not using an external script file.
        default: 
     
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Groovy, Serialized Form
    • Field Detail

      • m_InlineScript

        protected GroovyScript m_InlineScript
        the inline script.
    • Constructor Detail

      • Groovy

        public Groovy()
    • Method Detail

      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the actor, which will be displayed in the GUI.
        Overrides:
        getQuickInfo in class AbstractScriptedTemplate
        Returns:
        null if no info available, otherwise short string
      • getDefaultInlineScript

        protected GroovyScript getDefaultInlineScript()
        Returns the default inline script.
        Returns:
        the default script
      • setInlineScript

        public void setInlineScript​(GroovyScript value)
        Sets the inline script to use instead of the external script file.
        Parameters:
        value - the inline script
      • getInlineScript

        public GroovyScript getInlineScript()
        Gets the inline script to use instead of the external script file.
        Returns:
        the inline script
      • inlineScriptTipText

        public String inlineScriptTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the explorer/experimenter gui
      • isInteractive

        public boolean isInteractive()
        Whether the flow generated is an interactive one.
        Specified by:
        isInteractive in class AbstractActorTemplate
        Returns:
        true if interactive