| Package | Description | 
|---|---|
| javax.script | The scripting API consists of interfaces and classes that define
Java TM Scripting Engines and provides
a framework for their use in Java applications. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | SimpleBindingsA simple implementation of Bindings backed by
 a  HashMapor some other specifiedMap. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected Bindings | SimpleScriptContext. engineScopeThis is the engine scope bindings. | 
| protected Bindings | SimpleScriptContext. globalScopeThis is the global scope bindings. | 
| Modifier and Type | Method and Description | 
|---|---|
| Bindings | ScriptEngine. createBindings()Returns an uninitialized  Bindings. | 
| Bindings | ScriptEngineManager. getBindings()getBindingsreturns the value of theglobalScopefield. | 
| Bindings | ScriptContext. getBindings(int scope)Gets the  Bindingsassociated with the given scope in thisScriptContext. | 
| Bindings | ScriptEngine. getBindings(int scope)Returns a scope of named values. | 
| Bindings | AbstractScriptEngine. getBindings(int scope)Returns the  Bindingswith the specified scope value in
 the protectedcontextfield. | 
| Bindings | SimpleScriptContext. getBindings(int scope)Returns the value of the  engineScopefield if specified scope isENGINE_SCOPE. | 
| Modifier and Type | Method and Description | 
|---|---|
| Object | CompiledScript. eval(Bindings bindings)Executes the program stored in the  CompiledScriptobject using
 the suppliedBindingsof attributes as theENGINE_SCOPEof the
 associatedScriptEngineduring script execution. | 
| Object | ScriptEngine. eval(Reader reader,
    Bindings n)Same as  eval(String, Bindings)except that the source of the script
 is provided as aReader. | 
| Object | AbstractScriptEngine. eval(Reader reader,
    Bindings bindings)eval(Reader, Bindings)calls the abstracteval(Reader, ScriptContext)method, passing it aScriptContextwhose Reader, Writers and Bindings for scopes other thatENGINE_SCOPEare identical to those members of the protectedcontextfield. | 
| Object | ScriptEngine. eval(String script,
    Bindings n)Executes the script using the  Bindingsargument as theENGINE_SCOPEBindingsof theScriptEngineduring the script execution. | 
| Object | AbstractScriptEngine. eval(String script,
    Bindings bindings)Same as  eval(Reader, Bindings)except that the abstracteval(String, ScriptContext)is used. | 
| protected ScriptContext | AbstractScriptEngine. getScriptContext(Bindings nn)Returns a  SimpleScriptContext. | 
| void | ScriptEngineManager. setBindings(Bindings bindings)setBindingsstores the specifiedBindingsin theglobalScopefield. | 
| void | ScriptContext. setBindings(Bindings bindings,
           int scope)Associates a  Bindingsinstance with a particular scope in thisScriptContext. | 
| void | ScriptEngine. setBindings(Bindings bindings,
           int scope)Sets a scope of named values to be used by scripts. | 
| void | AbstractScriptEngine. setBindings(Bindings bindings,
           int scope)Sets the  Bindingswith the corresponding scope value in thecontextfield. | 
| void | SimpleScriptContext. setBindings(Bindings bindings,
           int scope)Sets a  Bindingsof attributes for the given scope. | 
| Constructor and Description | 
|---|
| AbstractScriptEngine(Bindings n)Creates a new instance using the specified  Bindingsas theENGINE_SCOPEBindingsin the protectedcontextfield. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2017, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.