## Uses of Interface
javax.script.Bindings

- Packages that use Bindings
  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.

- - ### Uses of Bindings in javax.script

    Classes in javax.script that implement Bindings
    Modifier and Type | Class and Description
    --- | ---
    `class` | `SimpleBindings` A simple implementation of Bindings backed by a `HashMap` or some other specified `Map`.

    Fields in javax.script declared as Bindings
    Modifier and Type | Field and Description
    --- | ---
    `protected Bindings` | SimpleScriptContext.`engineScope` This is the engine scope bindings.
    `protected Bindings` | SimpleScriptContext.`globalScope` This is the global scope bindings.

    Methods in javax.script that return Bindings
    Modifier and Type | Method and Description
    --- | ---
    `Bindings` | ScriptEngine.`createBindings()` Returns an uninitialized `Bindings`.
    `Bindings` | ScriptEngineManager.`getBindings()` `getBindings` returns the value of the `globalScope` field.
    `Bindings` | ScriptEngine.`getBindings(int scope)` Returns a scope of named values.
    `Bindings` | ScriptContext.`getBindings(int scope)` Gets the `Bindings` associated with the given scope in this `ScriptContext`.
    `Bindings` | AbstractScriptEngine.`getBindings(int scope)` Returns the `Bindings` with the specified scope value in the protected `context` field.
    `Bindings` | SimpleScriptContext.`getBindings(int scope)` Returns the value of the `engineScope` field if specified scope is `ENGINE_SCOPE`.

    Methods in javax.script with parameters of type Bindings
    Modifier and Type | Method and Description
    --- | ---
    `Object` | CompiledScript.`eval(Bindings bindings)` Executes the program stored in the `CompiledScript` object using the supplied `Bindings` of attributes as the `ENGINE_SCOPE` of the associated `ScriptEngine` during script execution.
    `Object` | ScriptEngine.`eval(Reader reader, Bindings n)` Same as `eval(String, Bindings)` except that the source of the script is provided as a `Reader`.
    `Object` | AbstractScriptEngine.`eval(Reader reader, Bindings bindings)` `eval(Reader, Bindings)` calls the abstract `eval(Reader, ScriptContext)` method, passing it a `ScriptContext` whose Reader, Writers and Bindings for scopes other that `ENGINE_SCOPE` are identical to those members of the protected `context` field.
    `Object` | ScriptEngine.`eval(String script, Bindings n)` Executes the script using the `Bindings` argument as the `ENGINE_SCOPE` `Bindings` of the `ScriptEngine` during the script execution.
    `Object` | AbstractScriptEngine.`eval(String script, Bindings bindings)` Same as `eval(Reader, Bindings)` except that the abstract `eval(String, ScriptContext)` is used.
    `protected ScriptContext` | AbstractScriptEngine.`getScriptContext(Bindings nn)` Returns a `SimpleScriptContext`.
    `void` | ScriptEngineManager.`setBindings(Bindings bindings)` `setBindings` stores the specified `Bindings` in the `globalScope` field.
    `void` | ScriptEngine.`setBindings(Bindings bindings, int scope)` Sets a scope of named values to be used by scripts.
    `void` | ScriptContext.`setBindings(Bindings bindings, int scope)` Associates a `Bindings` instance with a particular scope in this `ScriptContext`.
    `void` | AbstractScriptEngine.`setBindings(Bindings bindings, int scope)` Sets the `Bindings` with the corresponding scope value in the `context` field.
    `void` | SimpleScriptContext.`setBindings(Bindings bindings, int scope)` Sets a `Bindings` of attributes for the given scope.

    Constructors in javax.script with parameters of type Bindings
    Constructor and Description
    `AbstractScriptEngine(Bindings n)` Creates a new instance using the specified `Bindings` as the `ENGINE_SCOPE` `Bindings` in the protected `context` field.

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, 2015, Oracle and/or its affiliates. All rights reserved.