NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
JNIUtils.hpp File Reference
#include <Util/JNI/JNI.hpp>
#include <Util/SourceLocation.hpp>
#include <string_view>
#include <unordered_map>
Include dependency graph for JNIUtils.hpp:

Namespaces

 NES
 This exception represents a network error.
 
 NES::jni
 This header provides basic functions that simplify the interaction with a JVM over JNI.
 

Typedefs

using NES::jni::JavaSerializedInstance = std::vector< char >
 
using NES::jni::JavaByteCode = std::vector< char >
 
using NES::jni::JavaClassDefinition = std::pair< std::string, JavaByteCode >
 
using NES::jni::JavaUDFByteCodeList = std::vector< JavaClassDefinition >
 

Functions

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. More...
 
void NES::jni::freeObject (jobject object)
 
jobject NES::jni::allocateObject (jclass clazz)
 Allocates a new object instance for to a specific class. More...
 
jclass NES::jni::findClass (const std::string_view &clazzName)
 Finds a class with a given name. More...
 
jmethodID NES::jni::getMethod (jclass clazz, const std::string_view &methodName, const std::string_view &signature)
 Finds a method with a given name. More...
 
jobject NES::jni::createBoolean (bool value)
 Creates a java.lang.Boolean object for a given bool. More...
 
jobject NES::jni::createFloat (float value)
 Creates a java.lang.Float object for a given float. More...
 
jobject NES::jni::createDouble (double value)
 Creates a java.lang.Double object for a given double. More...
 
jobject NES::jni::createInteger (int32_t value)
 Creates a java.lang.Integer object for a given int32_t. More...
 
jobject NES::jni::createLong (int64_t value)
 Creates a java.lang.Long object for a given int64_t. More...
 
jobject NES::jni::createShort (int16_t value)
 Creates a java.lang.Short object for a given int16_t. More...
 
jobject NES::jni::createByte (int8_t value)
 Creates a java.lang.Byte object for a given int8_t. More...
 
jstring NES::jni::createString (const std::string_view &value)
 Creates a java.lang.String object for a given std::string_view. More...
 
bool NES::jni::getBooleanValue (jobject object)
 Extracts a bool from a java.lang.Boolean object. More...
 
float NES::jni::getFloatValue (jobject object)
 Extracts a float from a java.lang.Float object. More...
 
double NES::jni::getDoubleValue (jobject object)
 Extracts a double from a java.lang.Double object. More...
 
int32_t NES::jni::getIntegerValue (jobject object)
 Extracts a int32_t from a java.lang.Integer object. More...
 
int64_t NES::jni::getLongValue (jobject object)
 Extracts a int64_t from a java.lang.Long object. More...
 
int16_t NES::jni::getShortValue (jobject object)
 Extracts a int16_t from a java.lang.Short object. More...
 
int8_t NES::jni::getByteValue (jobject object)
 Extracts a int8_t from a java.lang.Byte object. More...
 
std::string NES::jni::getStringObjectValue (jstring object)
 Extracts a std::string from a java.lang.String object. More...
 
const std::string NES::jni::convertToJNIName (const std::string &javaClassName)
 Converts a class name into the correct jni name. More...