public class AbstractScriptContext extends Object implements ScriptContext
ScriptContext
for use in the
AbstractScriptEngine
.Modifier and Type | Field and Description |
---|---|
protected Writer |
errorWriter |
protected Reader |
reader |
protected Writer |
writer |
ENGINE_SCOPE, GLOBAL_SCOPE
Constructor and Description |
---|
AbstractScriptContext() |
Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(String key) |
Object |
getAttribute(String key,
int value) |
int |
getAttributesScope(String scope) |
Bindings |
getBindings(int scope) |
Writer |
getErrorWriter() |
Reader |
getReader() |
List<Integer> |
getScopes() |
Writer |
getWriter() |
Object |
removeAttribute(String key,
int scope) |
void |
setAttribute(String key,
Object value,
int scope) |
void |
setBindings(Bindings bindings,
int scope) |
void |
setErrorWriter(Writer errorWriter) |
void |
setReader(Reader reader) |
void |
setWriter(Writer writer) |
protected Reader reader
protected Writer writer
protected Writer errorWriter
public Reader getReader()
getReader
in interface ScriptContext
public Writer getWriter()
getWriter
in interface ScriptContext
public Writer getErrorWriter()
getErrorWriter
in interface ScriptContext
public void setReader(Reader reader)
setReader
in interface ScriptContext
public void setWriter(Writer writer)
setWriter
in interface ScriptContext
public void setErrorWriter(Writer errorWriter)
setErrorWriter
in interface ScriptContext
public Object getAttribute(String key)
getAttribute
in interface ScriptContext
public Object getAttribute(String key, int value)
getAttribute
in interface ScriptContext
public int getAttributesScope(String scope)
getAttributesScope
in interface ScriptContext
public Bindings getBindings(int scope)
getBindings
in interface ScriptContext
public List<Integer> getScopes()
getScopes
in interface ScriptContext
public Object removeAttribute(String key, int scope)
removeAttribute
in interface ScriptContext
public void setAttribute(String key, Object value, int scope)
setAttribute
in interface ScriptContext
public void setBindings(Bindings bindings, int scope)
setBindings
in interface ScriptContext
Copyright © 2015–2022 SciJava. All rights reserved.