public class FullSupportScriptEngine extends Object implements ScriptEngine, Compilable, Invocable
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME| Constructor and Description |
|---|
FullSupportScriptEngine(ScriptEngine engine)
构造
|
FullSupportScriptEngine(String nameOrExtOrMime)
构造
|
| Modifier and Type | Method and Description |
|---|---|
CompiledScript |
compile(Reader script) |
CompiledScript |
compile(String script) |
Bindings |
createBindings() |
Object |
eval(Reader reader) |
Object |
eval(Reader reader,
Bindings n) |
Object |
eval(Reader reader,
ScriptContext context) |
Object |
eval(String script) |
Object |
eval(String script,
Bindings n) |
Object |
eval(String script,
ScriptContext context) |
Object |
get(String key) |
Bindings |
getBindings(int scope) |
ScriptContext |
getContext() |
ScriptEngineFactory |
getFactory() |
<T> T |
getInterface(Class<T> clasz) |
<T> T |
getInterface(Object thiz,
Class<T> clasz) |
Object |
invokeFunction(String name,
Object... args) |
Object |
invokeMethod(Object thiz,
String name,
Object... args) |
void |
put(String key,
Object value) |
void |
setBindings(Bindings bindings,
int scope) |
void |
setContext(ScriptContext context) |
public FullSupportScriptEngine(ScriptEngine engine)
engine - 脚本引擎public FullSupportScriptEngine(String nameOrExtOrMime)
nameOrExtOrMime - 脚本名或者脚本语言扩展名或者MineTypepublic Object invokeMethod(Object thiz, String name, Object... args) throws ScriptException, NoSuchMethodException
invokeMethod in interface InvocableScriptExceptionNoSuchMethodExceptionpublic Object invokeFunction(String name, Object... args) throws ScriptException, NoSuchMethodException
invokeFunction in interface InvocableScriptExceptionNoSuchMethodExceptionpublic <T> T getInterface(Class<T> clasz)
getInterface in interface Invocablepublic <T> T getInterface(Object thiz, Class<T> clasz)
getInterface in interface Invocablepublic CompiledScript compile(String script) throws ScriptException
compile in interface CompilableScriptExceptionpublic CompiledScript compile(Reader script) throws ScriptException
compile in interface CompilableScriptExceptionpublic Object eval(String script, ScriptContext context) throws ScriptException
eval in interface ScriptEngineScriptExceptionpublic Object eval(Reader reader, ScriptContext context) throws ScriptException
eval in interface ScriptEngineScriptExceptionpublic Object eval(String script) throws ScriptException
eval in interface ScriptEngineScriptExceptionpublic Object eval(Reader reader) throws ScriptException
eval in interface ScriptEngineScriptExceptionpublic Object eval(String script, Bindings n) throws ScriptException
eval in interface ScriptEngineScriptExceptionpublic Object eval(Reader reader, Bindings n) throws ScriptException
eval in interface ScriptEngineScriptExceptionpublic void put(String key, Object value)
put in interface ScriptEnginepublic Object get(String key)
get in interface ScriptEnginepublic Bindings getBindings(int scope)
getBindings in interface ScriptEnginepublic void setBindings(Bindings bindings, int scope)
setBindings in interface ScriptEnginepublic Bindings createBindings()
createBindings in interface ScriptEnginepublic ScriptContext getContext()
getContext in interface ScriptEnginepublic void setContext(ScriptContext context)
setContext in interface ScriptEnginepublic ScriptEngineFactory getFactory()
getFactory in interface ScriptEngineCopyright © 2025. All rights reserved.