| java.lang.Object javax.script.SimpleScriptContext
All known Subclasses: javax.script.http.SimpleHttpScriptContext,
SimpleScriptContext | public class SimpleScriptContext implements ScriptContext(Code) | | Simple implementation of ScriptContext.
author: Mike Grogan version: 1.0 since: 1.6 |
engineScope | protected Bindings engineScope(Code) | | By default, a SimpleBindings is used.
|
errorWriter | protected Writer errorWriter(Code) | | By default, a PrintWriter based on System.err is
used.
|
globalScope | protected Bindings globalScope(Code) | | By default, a SimpleBindings is used.
|
reader | protected Reader reader(Code) | | By default, a InputStreamReader based on System.in
is used.
|
writer | protected Writer writer(Code) | | By default, a PrintWriter based on System.out
is used.
|
SimpleScriptContext | public SimpleScriptContext()(Code) | | |
getAttributesScope | public int getAttributesScope(String name)(Code) | | |
getBindings | public Bindings getBindings(int scope)(Code) | | Returns the value of the engineScope field if specified scope is
ENGINE_SCOPE . Returns the value of the globalScope field if the specified scope is
GLOBAL_SCOPE .
Parameters: scope - The specified scope The value of either the engineScope or globalScope field. IllegalArgumentException if the value of scope is invalid. |
setBindings | public void setBindings(Bindings bindings, int scope)(Code) | | Sets a Bindings of attributes for the given scope. If the value
of scope is ENGINE_SCOPE the given Bindings replaces the
engineScope field. If the value
of scope is GLOBAL_SCOPE the given Bindings replaces the
globalScope field.
Parameters: bindings - The Bindings of attributes to set. Parameters: scope - The value of the scope in which the attributes are set. IllegalArgumentException if scope is invalid. NullPointerException is the value of scope is ENGINE_SCOPE andthe specified Bindings is null. |
setErrorWriter | public void setErrorWriter(Writer writer)(Code) | | |
|
|