Class QJavaScriptExecutor
java.lang.Object
com.kingsrook.qqq.languages.javascript.QJavaScriptExecutor
- All Implemented Interfaces:
QCodeExecutor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertJavaObject
(Object object, Object requestedTypeHint) Convert a native java object into one for the script's language/runtime.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)
-
Constructor Details
-
QJavaScriptExecutor
public QJavaScriptExecutor()
-
-
Method Details
-
execute
public Serializable execute(QCodeReference codeReference, Map<String, Serializable> inputContext, QCodeExecutionLoggerInterface executionLogger) throws QCodeException- Specified by:
execute
in interfaceQCodeExecutor
- Throws:
QCodeException
-
convertObjectToJava
Description copied from interface:QCodeExecutor
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- Specified by:
convertObjectToJava
in interfaceQCodeExecutor
- 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- Specified by:
convertJavaObject
in interfaceQCodeExecutor
- Throws:
QCodeException
-