public class AbclScriptEngine extends AbstractScriptEngine implements Invocable, Compilable
Modifier and Type | Class and Description |
---|---|
class |
AbclScriptEngine.AbclCompiledScript |
Modifier and Type | Field and Description |
---|---|
private Function |
compileScript
The function used to compile Lisp code.
|
(package private) Function |
evalCompiledScript
The function used to evaluate a compiled script.
|
private Function |
evalFunction
The function used to evaluate a Lisp function.
|
private Function |
evalScript
The function used to evaluate a string of code.
|
private Interpreter |
interpreter |
context
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME
Modifier | Constructor and Description |
---|---|
protected |
AbclScriptEngine() |
eval, eval, eval, eval, get, getBindings, getContext, getScriptContext, put, setBindings, setContext
private Interpreter interpreter
private Function evalScript
private Function evalFunction
private Function compileScript
Function evalCompiledScript
public Interpreter getInterpreter()
public void setStandardInput(InputStream stream, LispThread thread)
public void setStandardInput(InputStream stream)
public void setInterpreter(Interpreter interpreter)
public LispObject loadFromClasspath(String classpathResource)
public LispObject load(Stream stream)
public LispObject load(String filespec)
public LispObject load(String filespec, boolean compileIfNecessary)
public static boolean isCompiled(String filespec)
public LispObject compileFile(String filespec)
public LispObject compileAndLoad(String filespec)
public static boolean functionp(LispObject obj)
public JavaObject jsetq(String symbol, Object value)
public Bindings createBindings()
createBindings
in interface ScriptEngine
private static LispObject makeBindings(Bindings bindings)
Object eval(Function evaluator, LispObject code, ScriptContext ctx) throws ScriptException
ScriptException
public Object eval(String code, ScriptContext ctx) throws ScriptException
eval
in interface ScriptEngine
ScriptException
private static String toString(Reader reader) throws IOException
IOException
public Object eval(Reader code, ScriptContext ctx) throws ScriptException
eval
in interface ScriptEngine
ScriptException
public ScriptEngineFactory getFactory()
getFactory
in interface ScriptEngine
public <T> T getInterface(Class<T> clasz)
getInterface
in interface Invocable
public <T> T getInterface(Object thiz, Class<T> clasz)
getInterface
in interface Invocable
public Object invokeFunction(String name, Object... args) throws ScriptException, NoSuchMethodException
invokeFunction
in interface Invocable
ScriptException
NoSuchMethodException
public Object invokeMethod(Object thiz, String name, Object... args) throws ScriptException, NoSuchMethodException
invokeMethod
in interface Invocable
ScriptException
NoSuchMethodException
public CompiledScript compile(String script) throws ScriptException
compile
in interface Compilable
ScriptException
public CompiledScript compile(Reader script) throws ScriptException
compile
in interface Compilable
ScriptException