Interface QCodeExecutor
- All Known Implementing Classes:
QJavaExecutor
,QJavaScriptExecutor
public interface QCodeExecutor
Interface to be implemented by language-specific code executors, e.g., in
qqq-language-support-${languageName} maven modules.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Object
convertJavaObject
(Object object, Object requestedTypeHint) Convert a native java object into one for the script's language/runtime.default Object
convertObjectToJava
(Object object) Process an object from the script's language/runtime into a (more) native java object.execute
(QCodeReference codeReference, Map<String, Serializable> inputContext, QCodeExecutionLoggerInterface executionLogger)
-
Method Details
-
execute
Serializable execute(QCodeReference codeReference, Map<String, Serializable> inputContext, QCodeExecutionLoggerInterface executionLogger) throws QCodeException- Throws:
QCodeException
-
convertObjectToJava
Process an object from the script's language/runtime into a (more) native java object. e.g., a Nashorn ScriptObjectMirror will end up as a "primitive", or a List or Map of such- Throws:
QCodeException
-
convertJavaObject
Convert a native java object into one for the script's language/runtime. e.g., a java Instant to a Nashorn Date- Throws:
QCodeException
-