|
static void | initQore () throws Throwable |
| Initialize the qore library and the jni module from a native Java thread. More...
|
|
static void | initQoreBootstrap () throws Throwable |
| Initialize the qore library and the jni module in memory only from a native Java thread. More...
|
|
static Object | callFunction (String name, Object... args) throws Throwable |
| Calls the given Qore function with the given arguments and returns the result.
|
|
static Object | callFunctionArgs (String name, Object[] args) throws Throwable |
| Calls a Qore function and returns the result as a Java Object, takes a variable number of arguments.
|
|
static Object | callFunctionSave (String name, Object... args) throws Throwable |
| Calls the given Qore function with the given arguments and returns the result; if an object is returned, then a strong reference to the object is stored in thread-local data. More...
|
|
static Object | callFunctionSaveArgs (String name, Object[] args) throws Throwable |
| Calls the given Qore function with the given arguments and returns the result; if an object is returned, then a strong reference to the object is stored in thread-local data, takes a variable number of arguments. More...
|
|
static Object | callStaticMethod (String class_name, String method_name, Object... args) throws Throwable |
| Calls the given Qore static method with the given arguments and returns the result.
|
|
static Object | callStaticMethodArgs (String class_name, String method_name, Object[] args) throws Throwable |
| Calls a Qore static method and returns the result as a Java Object, takes a variable number of arguments.
|
|
static Object | callStaticMethodSave (String class_name, String method_name, Object... args) throws Throwable |
| Calls the given Qore static method with the given arguments and returns the result; if an object is returned, then a strong reference to the object is stored in thread-local data. More...
|
|
static Object | callStaticMethodSaveArgs (String class_name, String method_name, Object[] args) throws Throwable |
| Calls the given Qore static method with the given arguments and returns the result; if an object is returned, then a strong reference to the object is stored in thread-local data, takes a variable number of arguments. More...
|
|
static QoreObject | newObjectSave (String class_name, Object... args) throws Throwable |
| Creates a new QoreObject from the class name and constructor arguments; a strong reference to the object is stored in thread-local data. More...
|
|
static QoreObject | newObjectSaveArgs (String class_name, Object[] args) throws Throwable |
| Creates a new QoreObject from the class name and constructor arguments; a strong reference to the object is stored in thread-local data under the given key. More...
|
|
static boolean | registerJavaThread () |
| Registers the current Java thread as a Qore thread. More...
|
|
static void | deregisterJavaThread () |
| Deregisters the current thread as a Qore thread. More...
|
|
static StackTraceElement[] | getStackTrace () |
| Returns the current stack trace, not including the call to this method.
|
|
This class provides methods that allow Java to interface with Qore code.
static void org.qore.jni.QoreJavaApi.initQore |
( |
| ) |
throws Throwable |
|
inlinestatic |
Initialize the qore
library and the jni
module from a native Java thread.
This method allows Qore
functionality or Java APIs backed by Qore
APIs to be used from native Java threads in an existing JVM process not started by Qore
itself.
This requires the platform-dependent qore
library to be found in a directory set in the java.library.path
or by setting the QORE_LIBRARY
environment variable to the absolute path of the qore
library.
If neither of these are set, then calling this method will result in a java.lang.UnsatisfiedLinkError
exception being raised.
This method is also safe to call when the Qore library and the jni module have been initialized already.
static void org.qore.jni.QoreJavaApi.initQoreBootstrap |
( |
| ) |
throws Throwable |
|
inlinestatic |
Initialize the qore
library and the jni
module in memory only from a native Java thread.
This method ensures that the qore library is loaded when the jni module is bootstrapped from Java
This requires the platform-dependent qore
library to be found in a directory set in the java.library.path
or by setting the QORE_LIBRARY
environment variable to the absolute path of the qore
library.
If neither of these are set, then calling this method will result in a java.lang.UnsatisfiedLinkError
exception being raised.
This method is also safe to call when the Qore library and the jni module have been initialized already.