NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
This header provides basic functions that simplify the interaction with a JVM over JNI. More...
Classes | |
class | JVM |
class | NameResolutionException |
class | InitializationException |
Typedefs | |
typedef JNIEnv_ | JNIEnv |
typedef JavaVM_ | JavaVM |
typedef _jobject * | jobject |
typedef _jclass * | jclass |
typedef _jarray * | jarray |
typedef _jstring * | jstring |
typedef struct _jmethodID * | jmethodID |
using | JavaSerializedInstance = std::vector< char > |
using | JavaByteCode = std::vector< char > |
using | JavaClassDefinition = std::pair< std::string, JavaByteCode > |
using | JavaUDFByteCodeList = std::vector< JavaClassDefinition > |
Functions | |
JNIEnv * | getEnv () |
void | detachEnv () |
Detachs the current thread from the jvm and removes all local references. More... | |
void | jniErrorCheck (const std::source_location location=std::source_location::current()) |
Checks for a pending exception in the JNI environment and throws a runtime error if one is found. More... | |
void | freeObject (jobject object) |
jobject | allocateObject (jclass clazz) |
Allocates a new object instance for to a specific class. More... | |
jclass | findClass (const std::string_view &clazzName) |
Finds a class with a given name. More... | |
jmethodID | getMethod (jclass clazz, const std::string_view &methodName, const std::string_view &signature) |
Finds a method with a given name. More... | |
jobject | createBoolean (bool value) |
Creates a java.lang.Boolean object for a given bool. More... | |
jobject | createFloat (float value) |
Creates a java.lang.Float object for a given float. More... | |
jobject | createDouble (double value) |
Creates a java.lang.Double object for a given double. More... | |
jobject | createInteger (int32_t value) |
Creates a java.lang.Integer object for a given int32_t. More... | |
jobject | createLong (int64_t value) |
Creates a java.lang.Long object for a given int64_t. More... | |
jobject | createShort (int16_t value) |
Creates a java.lang.Short object for a given int16_t. More... | |
jobject | createByte (int8_t value) |
Creates a java.lang.Byte object for a given int8_t. More... | |
jstring | createString (const std::string_view &value) |
Creates a java.lang.String object for a given std::string_view. More... | |
bool | getBooleanValue (jobject object) |
Extracts a bool from a java.lang.Boolean object. More... | |
float | getFloatValue (jobject object) |
Extracts a float from a java.lang.Float object. More... | |
double | getDoubleValue (jobject object) |
Extracts a double from a java.lang.Double object. More... | |
int32_t | getIntegerValue (jobject object) |
Extracts a int32_t from a java.lang.Integer object. More... | |
int64_t | getLongValue (jobject object) |
Extracts a int64_t from a java.lang.Long object. More... | |
int16_t | getShortValue (jobject object) |
Extracts a int16_t from a java.lang.Short object. More... | |
int8_t | getByteValue (jobject object) |
Extracts a int8_t from a java.lang.Byte object. More... | |
std::string | getStringObjectValue (jstring object) |
Extracts a std::string from a java.lang.String object. More... | |
const std::string | convertToJNIName (const std::string &javaClassName) |
Converts a class name into the correct jni name. More... | |
This header provides basic functions that simplify the interaction with a JVM over JNI.
typedef _jarray* NES::jni::jarray |
using NES::jni::JavaByteCode = typedef std::vector<char> |
using NES::jni::JavaClassDefinition = typedef std::pair<std::string, JavaByteCode> |
using NES::jni::JavaSerializedInstance = typedef std::vector<char> |
using NES::jni::JavaUDFByteCodeList = typedef std::vector<JavaClassDefinition> |
typedef JavaVM_ NES::jni::JavaVM |
typedef _jclass* NES::jni::jclass |
typedef struct _jmethodID* NES::jni::jmethodID |
typedef JNIEnv_ NES::jni::JNIEnv |
typedef _jobject* NES::jni::jobject |
typedef _jstring* NES::jni::jstring |
Allocates a new object instance for to a specific class.
clazz |
const std::string NES::jni::convertToJNIName | ( | const std::string & | javaClassName | ) |
Converts a class name into the correct jni name.
javaClassName |
jobject NES::jni::createBoolean | ( | bool | value | ) |
Creates a java.lang.Boolean object for a given bool.
value |
Referenced by NES::TEST_F().
jobject NES::jni::createByte | ( | int8_t | value | ) |
Creates a java.lang.Byte object for a given int8_t.
value |
jobject NES::jni::createDouble | ( | double | value | ) |
Creates a java.lang.Double object for a given double.
value |
Referenced by NES::TEST_F().
jobject NES::jni::createFloat | ( | float | value | ) |
Creates a java.lang.Float object for a given float.
value |
Referenced by NES::TEST_F().
jobject NES::jni::createInteger | ( | int32_t | value | ) |
Creates a java.lang.Integer object for a given int32_t.
value |
Referenced by NES::TEST_F().
jobject NES::jni::createLong | ( | int64_t | value | ) |
Creates a java.lang.Long object for a given int64_t.
value |
jobject NES::jni::createShort | ( | int16_t | value | ) |
Creates a java.lang.Short object for a given int16_t.
value |
jstring NES::jni::createString | ( | const std::string_view & | value | ) |
Creates a java.lang.String object for a given std::string_view.
value |
void NES::jni::detachEnv | ( | ) |
Detachs the current thread from the jvm and removes all local references.
jclass NES::jni::findClass | ( | const std::string_view & | clazzName | ) |
Finds a class with a given name.
clazzName |
void NES::jni::freeObject | ( | jobject | object | ) |
Free a jvm object
object | object to free |
bool NES::jni::getBooleanValue | ( | jobject | object | ) |
Extracts a bool from a java.lang.Boolean object.
object |
int8_t NES::jni::getByteValue | ( | jobject | object | ) |
Extracts a int8_t from a java.lang.Byte object.
object |
double NES::jni::getDoubleValue | ( | jobject | object | ) |
Extracts a double from a java.lang.Double object.
object |
JNIEnv* NES::jni::getEnv | ( | ) |
Get the appropriate JNI environment for this thread.
float NES::jni::getFloatValue | ( | jobject | object | ) |
Extracts a float from a java.lang.Float object.
object |
int32_t NES::jni::getIntegerValue | ( | jobject | object | ) |
Extracts a int32_t from a java.lang.Integer object.
object |
int64_t NES::jni::getLongValue | ( | jobject | object | ) |
Extracts a int64_t from a java.lang.Long object.
object |
jmethodID NES::jni::getMethod | ( | jclass | clazz, |
const std::string_view & | methodName, | ||
const std::string_view & | signature | ||
) |
Finds a method with a given name.
methodName |
int16_t NES::jni::getShortValue | ( | jobject | object | ) |
Extracts a int16_t from a java.lang.Short object.
object |
std::string NES::jni::getStringObjectValue | ( | jstring | object | ) |
Extracts a std::string from a java.lang.String object.
object |
void NES::jni::jniErrorCheck | ( | const std::source_location | location = std::source_location::current() | ) |
Checks for a pending exception in the JNI environment and throws a runtime error if one is found.
source_location | source_location of callee |