Class AbstractScriptedCondition

    • Field Detail

      • m_ScriptOptions

        protected String m_ScriptOptions
        the options for the Groovy module.
      • m_ScriptObject

        protected transient Object m_ScriptObject
        the loaded script object.
    • Constructor Detail

      • AbstractScriptedCondition

        public AbstractScriptedCondition()
    • Method Detail

      • reset

        public void reset()
        Resets the condition. Derived classes must call this method in set-methods of parameters to assure the invalidation of previously generated data.
        Overrides:
        reset in class AbstractOptionHandler
      • scriptFileTipText

        public String scriptFileTipText()
        Returns the tip text for this property.
        Specified by:
        scriptFileTipText in interface FileBasedScripting
        Returns:
        tip text for this property suitable for displaying in the explorer/experimenter gui
      • loadScriptObject

        protected abstract String loadScriptObject()
        Loads the scripts object and sets its options.
        Returns:
        null if OK, otherwise the error message
      • checkScriptObject

        protected abstract String checkScriptObject()
        Checks the script object.
        Returns:
        null if OK, otherwise the error message
      • initScriptObject

        protected String initScriptObject()
        Tries to initialize the scripts object, sets its options and performs some checks.
        Returns:
        null if OK, otherwise the error message
      • doScriptEvaluate

        protected abstract boolean doScriptEvaluate​(Actor owner,
                                                    Token token)
        Runs the script evaluation.
        Returns:
        the boolean result of the evaluation
      • doEvaluate

        protected boolean doEvaluate​(Actor owner,
                                     Token token)
        Performs the actual evaluation.
        Specified by:
        doEvaluate in class AbstractBooleanCondition
        Parameters:
        owner - the owning actor
        token - the current token passing through
        Returns:
        the result of the evaluation