Class JavaCompiledScript


  • public class JavaCompiledScript
    extends javax.script.CompiledScript
    The compiled Java script created by a JavaScriptEngine.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object eval​(javax.script.ScriptContext context)  
      javax.script.ScriptEngine getEngine()  
      java.lang.Object getInstance()
      Returns the instance of the compiled Class.
      java.lang.Class<?> getInstanceClass()
      Returns the compiled Class.
      void setExecutionStrategy​(ExecutionStrategy executionStrategy)
      Sets the ExecutionStrategy to be used when evaluating the compiled class instance.
      • Methods inherited from class javax.script.CompiledScript

        eval, eval
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstanceClass

        public java.lang.Class<?> getInstanceClass()
        Returns the compiled Class.
        Returns:
        the compiled Class.
      • getInstance

        public java.lang.Object getInstance()
        Returns the instance of the compiled Class.
        Returns:
        the instance of the compiled Class or null if no instance was created and only static methods will be called by the the ExecutionStrategy.
      • getEngine

        public javax.script.ScriptEngine getEngine()
        Specified by:
        getEngine in class javax.script.CompiledScript
      • eval

        public java.lang.Object eval​(javax.script.ScriptContext context)
                              throws javax.script.ScriptException
        Specified by:
        eval in class javax.script.CompiledScript
        Throws:
        javax.script.ScriptException