| java.lang.Object | |
| ↳ | javax.script.AbstractScriptEngine | 
|  Known Direct Subclasses | 
Provides a standard implementation for several of the variants of the eval
 method.
 
 eval(Reader)
eval(String)
 eval(String, Bindings)
eval(Reader, Bindings)
 
 are implemented using the abstract methods
 
 eval(Reader,ScriptContext) or
 eval(String, ScriptContext)
 
 with a SimpleScriptContext.
 
 A SimpleScriptContext is used as the default ScriptContext
 of the AbstractScriptEngine..
| [Expand] Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From interface
javax.script.ScriptEngine | |||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| context | The default ScriptContextof thisAbstractScriptEngine. | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Creates a new instance of AbstractScriptEngine using a  SimpleScriptContextas its defaultScriptContext. | |||||||||||
| Creates a new instance using the specified  Bindingsas theENGINE_SCOPEBindingsin the protectedcontextfield. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| eval(Reader)calls the abstracteval(Reader, ScriptContext)passing the value of thecontextfield. | |||||||||||
| Same as  eval(Reader)except that the abstracteval(String, ScriptContext)is used. | |||||||||||
| Same as  eval(Reader, Bindings)except that the abstracteval(String, ScriptContext)is used. | |||||||||||
| eval(Reader, Bindings)calls the abstracteval(Reader, ScriptContext)method, passing it aScriptContextwhose Reader, Writers and Bindings for scopes other thatENGINE_SCOPEare identical to those members of the protectedcontextfield. | |||||||||||
| Gets the value for the specified key in the  ENGINE_SCOPEof the
 protectedcontextfield. | |||||||||||
| Returns the  Bindingswith the specified scope value in
 the protectedcontextfield. | |||||||||||
| Returns the value of the protected  contextfield. | |||||||||||
| Sets the specified value with the specified key in the  ENGINE_SCOPEBindingsof the protectedcontextfield. | |||||||||||
| Sets the  Bindingswith the corresponding scope value in thecontextfield. | |||||||||||
| Sets the value of the protected  contextfield to the specifiedScriptContext. | |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Returns a  SimpleScriptContext. | |||||||||||
| [Expand] Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class
  java.lang.Object | |||||||||||
|  From interface
  javax.script.ScriptEngine | |||||||||||
Creates a new instance of AbstractScriptEngine using a SimpleScriptContext
 as its default ScriptContext.
Creates a new instance using the specified Bindings as the
 ENGINE_SCOPE Bindings in the protected context field.
| n | The specified Bindings. | 
|---|
| NullPointerException | if n is null. | 
|---|
eval(Reader) calls the abstract
 eval(Reader, ScriptContext) passing the value of the context
 field.
| reader | A Readercontaining the source of the script. | 
|---|
eval(Reader, ScriptContext)| ScriptException | if an error occurs in script. | 
|---|---|
| NullPointerException | if any of the parameters is null. | 
Same as eval(Reader) except that the abstract
 eval(String, ScriptContext) is used.
| script | A Stringcontaining the source of the script. | 
|---|
eval(String, ScriptContext)| ScriptException | if an error occurrs in script. | 
|---|---|
| NullPointerException | if any of the parameters is null. | 
Same as eval(Reader, Bindings) except that the abstract
 eval(String, ScriptContext) is used.
| script | A Stringcontaining the source of the script. | 
|---|---|
| bindings | A Bindingsto use as theENGINE_SCOPEwhile the script executes. | 
eval(String, ScriptContext)| ScriptException | if an error occurs in script. | 
|---|---|
| NullPointerException | if any of the parameters is null. | 
eval(Reader, Bindings) calls the abstract
 eval(Reader, ScriptContext) method, passing it a ScriptContext
 whose Reader, Writers and Bindings for scopes other that ENGINE_SCOPE
 are identical to those members of the protected context field.  The specified
 Bindings is used instead of the ENGINE_SCOPE
 Bindings of the context field.
| reader | A Readercontaining the source of the script. | 
|---|---|
| bindings | A Bindingsto use for theENGINE_SCOPEwhile the script executes. | 
eval(Reader, ScriptContext)| ScriptException | if an error occurs in script. | 
|---|---|
| NullPointerException | if any of the parameters is null. | 
Gets the value for the specified key in the ENGINE_SCOPE of the
 protected context field.
| key | The key whose value is to be returned | 
|---|
| NullPointerException | if key is null. | 
|---|---|
| IllegalArgumentException | if key is empty. | 
Returns the Bindings with the specified scope value in
 the protected context field.
| scope | The specified scope | 
|---|
Bindings.| IllegalArgumentException | if the value of scope is
 invalid for the type the protected contextfield. | 
|---|
Returns the value of the protected context field.
context field.
Sets the specified value with the specified key in the ENGINE_SCOPE
 Bindings of the protected context field.
| key | The specified key. | 
|---|---|
| value | The specified value. | 
| NullPointerException | if key is null. | 
|---|---|
| IllegalArgumentException | if key is empty. | 
Sets the Bindings with the corresponding scope value in the
 context field.
| bindings | The specified Bindings. | 
|---|---|
| scope | The specified scope. | 
| IllegalArgumentException | if the value of scope is
 invalid for the type the contextfield. | 
|---|---|
| NullPointerException | if the bindings is null and the scope is ScriptContext.ENGINE_SCOPE | 
Sets the value of the protected context field to the specified
 ScriptContext.
| ctxt | The specified ScriptContext. | 
|---|
| NullPointerException | if ctxt is null. | 
|---|
Returns a SimpleScriptContext.  The SimpleScriptContext:
 
Bindings for its ENGINE_SCOPE
 Bindings returned by the abstract getGlobalScope
 method as its GLOBAL_SCOPE
 ScriptContext of this
 ScriptEngine
 SimpleScriptContext returned by this method is used to implement eval methods
 using the abstract eval(Reader,Bindings) and eval(String,Bindings)
 versions.| nn | Bindings to use for the ENGINE_SCOPE | 
|---|
SimpleScriptContext