Public Member Functions

  • ~JniHelper ()
  • jobject
    GetActivityObject ()
  • jclass
    RetrieveClass (const std::string &name, bool clearExc=true)
  • JNIEnv *
    AttachCurrentThread ()
  • DeatchCurrentThread ()
  • jclass
    FindClass (const std::string &name)
  • jmethodID
    GetStaticMethodId (jclass clazz, const std::string &name, const std::string &sig)
  • CallStaticVoidMethod (jclass clazz, jmethodID methodId,...)
  • jmethodID
    GetMethodId (jclass clazz, const std::string &name, const std::string &sig)
  • CallVoidMethod (jobject obj, jmethodID methodId,...)
  • jfieldID
    GetStaticFieldId (jclass clazz, const std::string &name, const std::string &sig)
  • jfieldID
    GetStaticObjectFieldId (jclass clazz, const std::string &name, const std::string &sig)
  • GetStaticStringField (jclass clazz, jfieldID fieldId)
  • SetStaticStringField (jclass clazz, jfieldID fieldId, const std::string &value)
  • jfieldID
    GetFieldId (jclass clazz, const std::string &name, const std::string &sig)
  • jfieldID
    GetObjectFieldId (jclass clazz, const std::string &name, const std::string &sig)
  • GetStringField (jobject obj, jfieldID fieldId)
  • SetStringField (jobject obj, jfieldID fieldId, const std::string &value)
  • jobject
    NewGlobalRef (jobject obj)
  • DeleteGlobalRef (jobject globalRef)
  • TrackedNewGlobalRef (jobject obj)
  • TrackedDeleteGlobalRef (const JniGlobalObjectRef &globalRef)
  • jstring
    NewStringUTF (const std::string &str)
  • DeleteLocalRef (jobject localRef)
  • jsize
    GetArrayLength (jarray array)
  • jobject
    GetObjectArrayElements (jobjectArray array, jsize index)
  • jbyte *
    GetByteArrayElements (jbyteArray array, jboolean *isCopy)
  • jint *
    GetIntArrayElements (jintArray array, jboolean *isCopy)
  • ReleaseByteArrayElements (jbyteArray array, jbyte *elems, jint mode)
  • ReleaseIntArrayElements (jintArray array, jint *elems, jint mode)
  • jthrowable
    ExceptionOccurred ()
  • ExceptionDescribe ()
  • ExceptionClear ()
  • jboolean
    ExceptionCheck ()

Static Public Member Functions

  • Initialize (ANativeActivity *nativeActivity)
  • Destroy ()
  • Get ()
  • StdStringFromJString (JNIEnv *jniEnv, jstring jstr)
  • ThrowAsCppException (JNIEnv *jniEnv, const std::string &msg, bool clearExc=true)
  • ThrowAsCppExceptionFull (JNIEnv *jniEnv, const std::string &file, const int line, const std::string &fn, const std::string &msg, bool clearExc=true)