API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.script. ScriptContext View Source
Author(s)
Mike Grogan
Since
1.6
Version
1.0
Serial
Hierarchy
 ScriptContext
Subinterfaces
Description
public interface ScriptContext
  The interface whose implementing classes are used to connect Script Engines with objects, such as scoped Bindings, in hosting applications.
See also:   
Methods
Hide/Show inherited methods
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 Object getAttribute (String name, int scope)
  Gets the value of an attribute in a given scope.
public int getAttributesScope (String name)
  Get the lowest scope in which an attribute is defined.
public Bindings getBindings (int scope)
  Gets the Bindings associated with the given scope in this ScriptContext.
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.
public void setAttribute (String name, Object value, int scope)
  Sets the value of an attribute in a given scope.
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.
Fields
Hide/Show inherited fields
publicfinalstatic int ENGINE_SCOPE = "100"
EngineScope attributes are visible during the lifetime of a single ScriptEngine and a set of attributes is maintained for each engine.
publicfinalstatic int GLOBAL_SCOPE = "200"
GlobalScope attributes are visible to all engines created by same ScriptEngineFactory.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar