Java javax.script ScriptContext fields, constructors, methods, implement or subclass

Example usage for Java javax.script ScriptContext fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.script ScriptContext.

The text is from its open source code.

Field

intENGINE_SCOPE
EngineScope attributes are visible during the lifetime of a single ScriptEngine and a set of attributes is maintained for each engine.
intGLOBAL_SCOPE
GlobalScope attributes are visible to all engines created by same ScriptEngineFactory.

Method

ObjectgetAttribute(String name)
Retrieves the value of the attribute with the given name in the scope occurring earliest in the search order.
ObjectgetAttribute(String name, int scope)
Gets the value of an attribute in a given scope.
intgetAttributesScope(String name)
Get the lowest scope in which an attribute is defined.
BindingsgetBindings(int scope)
Gets the Bindings associated with the given scope in this ScriptContext.
WritergetErrorWriter()
Returns the Writer used to display error output.
ReadergetReader()
Returns a Reader to be used by the script to read input.
ListgetScopes()
Returns immutable List of all the valid values for scope in the ScriptContext.
WritergetWriter()
Returns the Writer for scripts to use when displaying output.
ObjectremoveAttribute(String name, int scope)
Remove an attribute in a given scope.
voidsetAttribute(String name, Object value, int scope)
Sets the value of an attribute in a given scope.
voidsetBindings(Bindings bindings, int scope)
Associates a Bindings instance with a particular scope in this ScriptContext.
voidsetErrorWriter(Writer writer)
Sets the Writer used to display error output.
voidsetWriter(Writer writer)
Sets the Writer for scripts to use when displaying output.