Interface ScriptingLanguageShell


  • public interface ScriptingLanguageShell
    Wrapper interface which wraps various Scripting Language interpreters for executing scripts. Script executions varies between different implementations, throws different exceptions and requires different objects for handling external variables. This interface provides consistent API for all of them.
    See Also:
    ScriptingLanguageExecutor
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object eval​(java.util.Map<java.lang.String,​java.lang.Object> ctx, java.lang.String script)
      Evaluates provided script and passes provided context object into proper Scripting Language shell.
    • Method Detail

      • eval

        java.lang.Object eval​(java.util.Map<java.lang.String,​java.lang.Object> ctx,
                              java.lang.String script)
                       throws ScriptCompilationException
        Evaluates provided script and passes provided context object into proper Scripting Language shell.
        Parameters:
        ctx - the context object which holds external variables
        script - the script body
        Returns:
        the result object
        Throws:
        ScriptCompilationException - the script compilation exception when script body contains syntax errors