A static utility class for common operations. More...
#include <Common.hpp>
Static Public Member Functions | |
| template<class T > | |
| static T | sum (T *values, jint len, T zero) |
| Takes the sum of an array of values. More... | |
| template<class T > | |
| static T | product (T *values, jint len, T one) |
| Takes the product of an array of values. More... | |
| static void | throwNew (JNIEnv *env, std::exception &exception) |
| Throws a new Java RuntimeException. More... | |
| static jclass | findClass (JNIEnv *env, const char *name) |
| Finds and loads a class. More... | |
| static jfieldID | getFieldId (JNIEnv *env, jclass clazz, const char *name, const char *type) |
| Gets a field identifier. More... | |
| static jfieldID | getStaticFieldId (JNIEnv *env, jclass clazz, const char *name, const char *type) |
| Gets a static field identifier. More... | |
| static jmethodID | getMethodId (JNIEnv *env, jclass clazz, const char *name, const char *type) |
| Gets a method identifier. More... | |
| static jmethodID | getStaticMethodId (JNIEnv *env, jclass clazz, const char *name, const char *type) |
| Gets a static method identifier. More... | |
| static jweak | newWeakGlobalRef (JNIEnv *env, jobject object) |
| Creates a global weak reference to the given object. More... | |
| static void | deleteWeakGlobalRef (JNIEnv *env, jweak weak) |
| Deletes a global weak reference. More... | |
| static jdoubleArray | newDoubleArray (JNIEnv *env, jint len) |
| Creates a Java array of type double[]. More... | |
| static jintArray | newIntArray (JNIEnv *env, jint len) |
| Creates a Java array of type int[]. More... | |
| static jbyteArray | newByteArray (JNIEnv *env, jint len) |
| Creates a Java array of type byte[]. More... | |
| static jobjectArray | newObjectArray (JNIEnv *env, jint len, jclass clazz) |
| Creates a Java array of the given component type. More... | |
| static jstring | newStringUtf (JNIEnv *env, const char *utf) |
| Creates a Java string. More... | |
A static utility class for common operations.
|
static |
Deletes a global weak reference.
| env | the JNI environment. |
| weak | the weak reference. |
|
static |
Finds and loads a class.
| env | the JNI environment. |
| name | the class name. |
|
static |
Gets a field identifier.
| env | the JNI environment. |
| clazz | the class. |
| name | the class name. |
| type | the type. |
|
static |
Gets a method identifier.
| env | the JNI environment. |
| clazz | the class. |
| name | the class name. |
| type | the type. |
|
static |
Gets a static field identifier.
| env | the JNI environment. |
| clazz | the class. |
| name | the class name. |
| type | the type. |
|
static |
Gets a static method identifier.
| env | the JNI environment. |
| clazz | the class. |
| name | the class name. |
| type | the type. |
|
static |
Creates a Java array of type byte[].
| env | the JNI environment. |
| len | the length. |
|
static |
Creates a Java array of type double[].
| env | the JNI environment. |
| len | the length. |
|
static |
Creates a Java array of type int[].
| env | the JNI environment. |
| len | the length. |
|
static |
Creates a Java array of the given component type.
| env | the JNI environment. |
| len | the length. |
| clazz | the component type. |
|
static |
Creates a Java string.
| env | the JNI environment. |
| utf | the null-terminated string. |
|
static |
Creates a global weak reference to the given object.
| env | the JNI environment. |
| object | the referent. |
|
inlinestatic |
Takes the product of an array of values.
| values | the values. |
| len | the length. |
| one | the representation of 1. |
|
inlinestatic |
Takes the sum of an array of values.
| values | the values. |
| len | the length. |
| zero | the representation of 0. |
|
static |
Throws a new Java RuntimeException.
| env | the JNI environment. |
| exception | the exception. |
1.8.3.1