public class InvocableScript extends Object implements Invocable
Constructor and Description |
---|
InvocableScript(ScriptModel script,
ScriptEngine scriptEngine) |
Modifier and Type | Method and Description |
---|---|
<T> T |
getInterface(Class<T> clazz) |
<T> T |
getInterface(Object thiz,
Class<T> clazz) |
boolean |
hasFunction(String functionName)
Returns true iif the
ScriptEngine has a function with the given functionName . |
Object |
invokeFunction(String name,
Object... args) |
Object |
invokeMethod(Object thiz,
String name,
Object... args) |
public InvocableScript(ScriptModel script, ScriptEngine scriptEngine)
public Object invokeMethod(Object thiz, String name, Object... args) throws ScriptException, NoSuchMethodException
invokeMethod
in interface Invocable
ScriptException
NoSuchMethodException
public Object invokeFunction(String name, Object... args) throws ScriptException, NoSuchMethodException
invokeFunction
in interface Invocable
ScriptException
NoSuchMethodException
public <T> T getInterface(Class<T> clazz)
getInterface
in interface Invocable
public <T> T getInterface(Object thiz, Class<T> clazz)
getInterface
in interface Invocable
public boolean hasFunction(String functionName)
ScriptEngine
has a function with the given functionName
.functionName
- Copyright © 2016 JBoss by Red Hat. All rights reserved.