Uses of Interface
javax.script.Bindings
Package
Description
The scripting API consists of interfaces and classes that define
Java Scripting Engines and provides
a framework for their use in Java applications.
-
Uses of Bindings in javax.script
Modifier and TypeClassDescriptionclass
A simple implementation of Bindings backed by aHashMap
or some other specifiedMap
.Modifier and TypeFieldDescriptionprotected Bindings
SimpleScriptContext.engineScope
This is the engine scope bindings.protected Bindings
SimpleScriptContext.globalScope
This is the global scope bindings.Modifier and TypeMethodDescriptionScriptEngine.createBindings()
Returns an uninitializedBindings
.AbstractScriptEngine.getBindings
(int scope) Returns theBindings
with the specified scope value in the protectedcontext
field.ScriptContext.getBindings
(int scope) Gets theBindings
associated with the given scope in thisScriptContext
.ScriptEngine.getBindings
(int scope) Returns a scope of named values.ScriptEngineManager.getBindings()
getBindings
returns the value of theglobalScope
field.SimpleScriptContext.getBindings
(int scope) Returns the value of theengineScope
field if specified scope isENGINE_SCOPE
.Modifier and TypeMethodDescriptioneval(Reader, Bindings)
calls the abstracteval(Reader, ScriptContext)
method, passing it aScriptContext
whose Reader, Writers and Bindings for scopes other thatENGINE_SCOPE
are identical to those members of the protectedcontext
field.Same aseval(Reader, Bindings)
except that the abstracteval(String, ScriptContext)
is used.Executes the program stored in theCompiledScript
object using the suppliedBindings
of attributes as theENGINE_SCOPE
of the associatedScriptEngine
during script execution.Same aseval(String, Bindings)
except that the source of the script is provided as aReader
.Executes the script using theBindings
argument as theENGINE_SCOPE
Bindings
of theScriptEngine
during the script execution.protected ScriptContext
AbstractScriptEngine.getScriptContext
(Bindings nn) Returns aSimpleScriptContext
.void
AbstractScriptEngine.setBindings
(Bindings bindings, int scope) Sets theBindings
with the corresponding scope value in thecontext
field.void
ScriptContext.setBindings
(Bindings bindings, int scope) Associates aBindings
instance 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
ScriptEngineManager.setBindings
(Bindings bindings) setBindings
stores the specifiedBindings
in theglobalScope
field.void
SimpleScriptContext.setBindings
(Bindings bindings, int scope) Sets aBindings
of attributes for the given scope.ModifierConstructorDescriptionCreates a new instance using the specifiedBindings
as theENGINE_SCOPE
Bindings
in the protectedcontext
field.