public class InvocableScriptAdapter extends Object implements Invocable
ScriptModel and makes it Invocable.| Constructor and Description |
|---|
InvocableScriptAdapter(ScriptModel scriptModel,
ScriptEngine scriptEngine)
Creates a new
InvocableScriptAdapter instance. |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
getInterface(Class<T> clazz) |
<T> T |
getInterface(Object thiz,
Class<T> clazz) |
Object |
invokeFunction(String name,
Object... args) |
Object |
invokeMethod(Object thiz,
String name,
Object... args) |
boolean |
isDefined(String name)
Returns true if the
ScriptEngine has a definition with the given name. |
public InvocableScriptAdapter(ScriptModel scriptModel, ScriptEngine scriptEngine)
InvocableScriptAdapter instance.scriptModel - must not be nullscriptEngine - must not be nullpublic Object invokeMethod(Object thiz, String name, Object... args) throws ScriptExecutionException
invokeMethod in interface InvocableScriptExecutionExceptionpublic Object invokeFunction(String name, Object... args) throws ScriptExecutionException
invokeFunction in interface InvocableScriptExecutionExceptionpublic <T> T getInterface(Class<T> clazz)
getInterface in interface Invocablepublic <T> T getInterface(Object thiz, Class<T> clazz)
getInterface in interface Invocablepublic boolean isDefined(String name)
ScriptEngine has a definition with the given name.name - Copyright © 2021 JBoss by Red Hat. All rights reserved.