Liking cljdoc? Tell your friends :D

javax.script.ScriptContext

The interface whose implementing classes are used to connect Script Engines with objects, such as scoped Bindings, in hosting applications. Each scope is a set of named attributes whose values can be set and retrieved using the ScriptContext methods. ScriptContexts also expose Readers and Writers that can be used by the ScriptEngines for input and output.

The interface whose implementing classes are used to connect Script Engines
with objects, such as scoped Bindings, in hosting applications.  Each scope is a set
of named attributes whose values can be set and retrieved using the
ScriptContext methods. ScriptContexts also expose Readers and Writers
that can be used by the ScriptEngines for input and output.
raw docstring

get-attributeclj

(get-attribute this name)
(get-attribute this name scope)

Gets the value of an attribute in a given scope.

name - The name of the attribute to retrieve. - java.lang.String scope - The scope in which to retrieve the attribute. - int

returns: The value of the attribute. Returns null is the name does not exist in the given scope. - java.lang.Object

throws: java.lang.IllegalArgumentException - if the name is empty or if the value of scope is invalid.

Gets the value of an attribute in a given scope.

name - The name of the attribute to retrieve. - `java.lang.String`
scope - The scope in which to retrieve the attribute. - `int`

returns: The value of the attribute. Returns null is the name
 does not exist in the given scope. - `java.lang.Object`

throws: java.lang.IllegalArgumentException - if the name is empty or if the value of scope is invalid.
raw docstring

get-attributes-scopeclj

(get-attributes-scope this name)

Get the lowest scope in which an attribute is defined.

name - Name of the attribute . - java.lang.String

returns: The lowest scope. Returns -1 if no attribute with the given name is defined in any scope. - int

throws: java.lang.NullPointerException - if name is null.

Get the lowest scope in which an attribute is defined.

name - Name of the attribute . - `java.lang.String`

returns: The lowest scope.  Returns -1 if no attribute with the given
 name is defined in any scope. - `int`

throws: java.lang.NullPointerException - if name is null.
raw docstring

get-bindingsclj

(get-bindings this scope)

Gets the Bindings associated with the given scope in this ScriptContext.

scope - The scope - int

returns: The associated Bindings. Returns null if it has not been set. - javax.script.Bindings

throws: java.lang.IllegalArgumentException - If no Bindings is defined for the specified scope value in ScriptContext of this type.

Gets the Bindings  associated with the given scope in this
 ScriptContext.

scope - The scope - `int`

returns: The associated Bindings.  Returns null if it has not
 been set. - `javax.script.Bindings`

throws: java.lang.IllegalArgumentException - If no Bindings is defined for the specified scope value in ScriptContext of this type.
raw docstring

get-error-writerclj

(get-error-writer this)

Returns the Writer used to display error output.

returns: The Writer - java.io.Writer

Returns the Writer used to display error output.

returns: The Writer - `java.io.Writer`
raw docstring

get-readerclj

(get-reader this)

Returns a Reader to be used by the script to read input.

returns: The Reader. - java.io.Reader

Returns a Reader to be used by the script to read
 input.

returns: The Reader. - `java.io.Reader`
raw docstring

get-scopesclj

(get-scopes this)

Returns immutable List of all the valid values for scope in the ScriptContext.

returns: list of scope values - java.util.List<java.lang.Integer>

Returns immutable List of all the valid values for
 scope in the ScriptContext.

returns: list of scope values - `java.util.List<java.lang.Integer>`
raw docstring

get-writerclj

(get-writer this)

Returns the Writer for scripts to use when displaying output.

returns: The Writer. - java.io.Writer

Returns the Writer for scripts to use when displaying output.

returns: The Writer. - `java.io.Writer`
raw docstring

remove-attributeclj

(remove-attribute this name scope)

Remove an attribute in a given scope.

name - The name of the attribute to remove - java.lang.String scope - The scope in which to remove the attribute - int

returns: The removed value. - java.lang.Object

throws: java.lang.IllegalArgumentException - if the name is empty or if the scope is invalid.

Remove an attribute in a given scope.

name - The name of the attribute to remove - `java.lang.String`
scope - The scope in which to remove the attribute - `int`

returns: The removed value. - `java.lang.Object`

throws: java.lang.IllegalArgumentException - if the name is empty or if the scope is invalid.
raw docstring

set-attributeclj

(set-attribute this name value scope)

Sets the value of an attribute in a given scope.

name - The name of the attribute to set - java.lang.String value - The value of the attribute - java.lang.Object scope - The scope in which to set the attribute - int

throws: java.lang.IllegalArgumentException - if the name is empty or if the scope is invalid.

Sets the value of an attribute in a given scope.

name - The name of the attribute to set - `java.lang.String`
value - The value of the attribute - `java.lang.Object`
scope - The scope in which to set the attribute - `int`

throws: java.lang.IllegalArgumentException - if the name is empty or if the scope is invalid.
raw docstring

set-bindingsclj

(set-bindings this bindings scope)

Associates a Bindings instance with a particular scope in this ScriptContext. Calls to the getAttribute and setAttribute methods must map to the get and put methods of the Bindings for the specified scope.

bindings - The Bindings to associate with the given scope - javax.script.Bindings scope - The scope - int

throws: java.lang.IllegalArgumentException - If no Bindings is defined for the specified scope value in ScriptContexts of this type.

Associates a Bindings instance with a particular scope in this
 ScriptContext.  Calls to the getAttribute and
 setAttribute methods must map to the get and
 put methods of the Bindings for the specified scope.

bindings - The Bindings to associate with the given scope - `javax.script.Bindings`
scope - The scope - `int`

throws: java.lang.IllegalArgumentException - If no Bindings is defined for the specified scope value in ScriptContexts of this type.
raw docstring

set-error-writerclj

(set-error-writer this writer)

Sets the Writer used to display error output.

writer - The Writer. - java.io.Writer

Sets the Writer used to display error output.

writer - The Writer. - `java.io.Writer`
raw docstring

set-readerclj

(set-reader this reader)

Sets the Reader for scripts to read input .

reader - The new Reader. - java.io.Reader

Sets the Reader for scripts to read input
 .

reader - The new Reader. - `java.io.Reader`
raw docstring

set-writerclj

(set-writer this writer)

Sets the Writer for scripts to use when displaying output.

writer - The new Writer. - java.io.Writer

Sets the Writer for scripts to use when displaying output.

writer - The new Writer. - `java.io.Writer`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close