Class SourceExecutableScript

    • Field Detail

      • scriptSource

        protected java.lang.String scriptSource
        The source of the script.
      • shouldBeCompiled

        protected boolean shouldBeCompiled
        Flag to signal if the script should be compiled
    • Constructor Detail

      • SourceExecutableScript

        public SourceExecutableScript​(java.lang.String language,
                                      java.lang.String source)
    • Method Detail

      • compileScript

        protected void compileScript​(javax.script.ScriptEngine engine)
      • compile

        public javax.script.CompiledScript compile​(javax.script.ScriptEngine scriptEngine,
                                                   java.lang.String language,
                                                   java.lang.String src)
      • evaluateScript

        protected java.lang.Object evaluateScript​(javax.script.ScriptEngine engine,
                                                  javax.script.Bindings bindings)
                                           throws javax.script.ScriptException
      • getScriptSource

        public java.lang.String getScriptSource()
      • setScriptSource

        public void setScriptSource​(java.lang.String scriptSource)
        Sets the script source code. And invalidates any cached compilation result.
        scriptSource - the new script source code
      • isShouldBeCompiled

        public boolean isShouldBeCompiled()