API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.script. ScriptEngine View Source
Author(s)
Mike Grogan
Since
1.6
Version
1.0
Serial
Hierarchy
 ScriptEngine
Subinterfaces
Description
public interface ScriptEngine
  ScriptEngine is the fundamental interface whose methods must be fully functional in every implementation of this specification.
See also:   
Methods
Hide/Show inherited methods
public Bindings createBindings ()
  Returns an uninitialized Bindings.
public Object eval (Reader reader) throws ScriptException
  Same as eval(String) except that the source of the script is provided as a Reader
public Object eval (Reader reader, Bindings n) throws ScriptException
  Same as eval(String, Bindings) except that the source of the script is provided as a Reader.
public Object eval (Reader reader, ScriptContext context) throws ScriptException
  Same as eval(String, ScriptContext) where the source of the script is read from a Reader.
public Object eval (String script) throws ScriptException
  Executes the specified script.
public Object eval (String script, Bindings n) throws ScriptException
  Executes the script using the Bindings argument as the ENGINE_SCOPE Bindings of the ScriptEngine during the script execution.
public Object eval (String script, ScriptContext context) throws ScriptException
  Causes the immediate execution of the script whose source is the String passed as the first argument.
public Object get (String key)
  Retrieves a value set in the state of this engine.
public Bindings getBindings (int scope)
  Returns a scope of named values.
public ScriptContext getContext ()
  Returns the default ScriptContext of the ScriptEngine whose Bindings, Reader and Writers are used for script executions when no ScriptContext is specified.
public ScriptEngineFactory getFactory ()
  Returns a ScriptEngineFactory for the class to which this ScriptEngine belongs.
public void put (String key, Object value)
  Sets a key/value pair in the state of the ScriptEngine that may either create a Java Language Binding to be used in the execution of scripts or be used in some other way, depending on whether the key is reserved.
public void setBindings (Bindings bindings, int scope)
  Sets a scope of named values to be used by scripts.
public void setContext (ScriptContext context)
  Sets the default ScriptContext of the ScriptEngine whose Bindings, Reader and Writers are used for script executions when no ScriptContext is specified.
Fields
Hide/Show inherited fields
publicfinalstatic String ARGV = "javax.script.argv"
Reserved key for a named value that passes an array of positional arguments to a script.
publicfinalstatic String ENGINE = "javax.script.engine"
Reserved key for a named value that is the name of the ScriptEngine implementation.
publicfinalstatic String ENGINE_VERSION = "javax.script.engine_version"
Reserved key for a named value that identifies the version of the ScriptEngine implementation.
publicfinalstatic String FILENAME = "javax.script.filename"
Reserved key for a named value that is the name of the file being executed.
publicfinalstatic String LANGUAGE = "javax.script.language"
Reserved key for a named value that is the full name of Scripting Language supported by the implementation.
publicfinalstatic String LANGUAGE_VERSION = "javax.script.language_version"
Reserved key for the named value that identifies the version of the scripting language supported by the implementation.
publicfinalstatic String NAME = "javax.script.name"
  Reserved key for a named value that identifies the short name of the scripting language.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar