public class JavaScriptEngine extends FullSupportScriptEngine
ARGV, ENGINE, ENGINE_VERSION, FILENAME, LANGUAGE, LANGUAGE_VERSION, NAME| 构造器和说明 |
|---|
JavaScriptEngine() |
| 限定符和类型 | 方法和说明 |
|---|---|
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) |
static JavaScriptEngine |
instance()
引擎实例
|
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 static JavaScriptEngine instance()
public Object invokeMethod(Object thiz, String name, Object... args) throws ScriptException, NoSuchMethodException
invokeMethod 在接口中 InvocableinvokeMethod 在类中 FullSupportScriptEngineScriptExceptionNoSuchMethodExceptionpublic Object invokeFunction(String name, Object... args) throws ScriptException, NoSuchMethodException
invokeFunction 在接口中 InvocableinvokeFunction 在类中 FullSupportScriptEngineScriptExceptionNoSuchMethodExceptionpublic <T> T getInterface(Class<T> clasz)
getInterface 在接口中 InvocablegetInterface 在类中 FullSupportScriptEnginepublic <T> T getInterface(Object thiz, Class<T> clasz)
getInterface 在接口中 InvocablegetInterface 在类中 FullSupportScriptEnginepublic CompiledScript compile(String script) throws ScriptException
compile 在接口中 Compilablecompile 在类中 FullSupportScriptEngineScriptExceptionpublic CompiledScript compile(Reader script) throws ScriptException
compile 在接口中 Compilablecompile 在类中 FullSupportScriptEngineScriptExceptionpublic Object eval(String script, ScriptContext context) throws ScriptException
eval 在接口中 ScriptEngineeval 在类中 FullSupportScriptEngineScriptExceptionpublic Object eval(Reader reader, ScriptContext context) throws ScriptException
eval 在接口中 ScriptEngineeval 在类中 FullSupportScriptEngineScriptExceptionpublic Object eval(String script) throws ScriptException
eval 在接口中 ScriptEngineeval 在类中 FullSupportScriptEngineScriptExceptionpublic Object eval(Reader reader) throws ScriptException
eval 在接口中 ScriptEngineeval 在类中 FullSupportScriptEngineScriptExceptionpublic Object eval(String script, Bindings n) throws ScriptException
eval 在接口中 ScriptEngineeval 在类中 FullSupportScriptEngineScriptExceptionpublic Object eval(Reader reader, Bindings n) throws ScriptException
eval 在接口中 ScriptEngineeval 在类中 FullSupportScriptEngineScriptExceptionpublic void put(String key, Object value)
put 在接口中 ScriptEngineput 在类中 FullSupportScriptEnginepublic Object get(String key)
get 在接口中 ScriptEngineget 在类中 FullSupportScriptEnginepublic Bindings getBindings(int scope)
getBindings 在接口中 ScriptEnginegetBindings 在类中 FullSupportScriptEnginepublic void setBindings(Bindings bindings, int scope)
setBindings 在接口中 ScriptEnginesetBindings 在类中 FullSupportScriptEnginepublic Bindings createBindings()
createBindings 在接口中 ScriptEnginecreateBindings 在类中 FullSupportScriptEnginepublic ScriptContext getContext()
getContext 在接口中 ScriptEnginegetContext 在类中 FullSupportScriptEnginepublic void setContext(ScriptContext context)
setContext 在接口中 ScriptEnginesetContext 在类中 FullSupportScriptEnginepublic ScriptEngineFactory getFactory()
getFactory 在接口中 ScriptEnginegetFactory 在类中 FullSupportScriptEngineCopyright © 2024. All rights reserved.