Method Summary |
|
public Object | getAttribute(String name, int scope) Gets the value of an attribute in a given scope.
Parameters: name - The name of the attribute to retrieve. Parameters: scope - The scope in which to retrieve the attribute. |
public Object | getAttribute(String name) Retrieves the value of the attribute with the given name in
the scope occurring earliest in the search order. |
public int | getAttributesScope(String name) Get the lowest scope in which an attribute is defined.
Parameters: name - Name of the attribute. |
public Bindings | getBindings(int scope) Gets the Bindings associated with the given scope in this
ScriptContext .
The associated Bindings . |
public Writer | getErrorWriter() Returns the Writer used to display error output. |
public Reader | getReader() Returns a Reader to be used by the script to read
input. |
public List<Integer> | getScopes() Returns immutable List of all the valid values for
scope in the ScriptContext. |
public Writer | getWriter() Returns the Writer for scripts to use when displaying output. |
public Object | removeAttribute(String name, int scope) Remove an attribute in a given scope.
Parameters: name - The name of the attribute to remove Parameters: scope - The scope in which to remove the attribute The removed value. |
public void | setAttribute(String name, Object value, int scope) Sets the value of an attribute in a given scope.
Parameters: name - The name of the attribute to set. Parameters: scope - The scope in which to set the attribute IllegalArgumentException if the scopeis invalid. |
public void | setBindings(Bindings bindings, int scope) Associates a Bindings instance with a particular scope in this
ScriptContext . |
public void | setErrorWriter(Writer writer) Sets the Writer used to display error output. |
public void | setReader(Reader reader) Sets the Reader for scripts to read input
. |
public void | setWriter(Writer writer) Sets the Writer for scripts to use when displaying output. |