18 #ifndef ION_PORT_ANDROID_JNIUTIL_H_
19 #define ION_PORT_ANDROID_JNIUTIL_H_
36 jmethodID
GetStaticMethod(JNIEnv* env, jclass clazz,
const char* class_name,
37 const char*
name,
const char* signature);
38 jmethodID
GetMethod(JNIEnv* env, jclass clazz,
const char* class_name,
39 const char*
name,
const char* signature);
40 jfieldID
GetStaticMember(JNIEnv* env, jclass clazz,
const char* class_name,
42 jfieldID
GetMember(JNIEnv* env, jclass clazz,
const char* class_name,
45 JNIEnv* env, jclass clazz,
const char* class_name,
const char*
name);
47 JNIEnv* env, jclass clazz,
const char* class_name,
const char*
name);
49 JNIEnv* env, jclass clazz,
const char* class_name,
const char*
name);
51 JNIEnv* env, jclass clazz,
const char* class_name,
const char*
name);
53 JNIEnv* env, jclass clazz,
const char* class_name,
const char*
name);
55 JNIEnv* env, jclass clazz,
const char* class_name,
const char*
name);
57 JNIEnv* env, jclass clazz,
const char* class_name,
const char*
name);
59 JNIEnv* env, jclass clazz,
const char* class_name,
const char*
name);
61 JNIEnv* env, jclass clazz,
const char* class_name,
const char*
name);
62 jstring
JavaString(JNIEnv* env,
const std::string& s);
64 jbyteArray
JavaByteArray(JNIEnv* env,
const std::string& bytes);
65 jbyteArray
JavaByteArray(JNIEnv* env,
const jbyte* data, jsize size);
68 jsize first, jsize size,
char* out);
85 explicit ScopedJObject(JNIEnv* env, jobject* obj): env_(env), obj_(obj) {}
96 #endif // ION_PORT_ANDROID_JNIUTIL_H_
void JavaGetByteArray(JNIEnv *env, jbyteArray array, jsize first, jsize size, char *out)
jfieldID GetStaticStringMember(JNIEnv *env, jclass clazz, const char *class_name, const char *name)
jbyteArray JavaByteArray(JNIEnv *env, const std::string &bytes)
void SetJVM(JavaVM *jvm)
Set the pointer to the JavaVM.
jfieldID GetStaticLongMember(JNIEnv *env, jclass clazz, const char *class_name, const char *name)
jfieldID GetStringMember(JNIEnv *env, jclass clazz, const char *class_name, const char *name)
jfieldID GetIntMember(JNIEnv *env, jclass clazz, const char *class_name, const char *name)
Pushes and pops a JNI local reference frame.
jclass FindClassGlobal(JNIEnv *env, const char *class_name)
jmethodID GetStaticMethod(JNIEnv *env, jclass clazz, const char *class_name, const char *name, const char *signature)
LocalFrame(JNIEnv *env)
Pushes a local reference frame frame with env->PushLocalFrame(0).
jstring JavaString(JNIEnv *env, const std::string &s)
jfieldID GetStaticBooleanMember(JNIEnv *env, jclass clazz, const char *class_name, const char *name)
Stack-allocate this to clean up a jobject at end of scope.
jfieldID GetMember(JNIEnv *env, jclass clazz, const char *class_name, const char *name, const char *type)
jobjectArray JavaStringArray(JNIEnv *env, int length)
ScopedJObject(JNIEnv *env, jobject *obj)
jfieldID GetLongMember(JNIEnv *env, jclass clazz, const char *class_name, const char *name)
jmethodID GetMethod(JNIEnv *env, jclass clazz, const char *class_name, const char *name, const char *signature)
jfieldID GetStaticMember(JNIEnv *env, jclass clazz, const char *class_name, const char *name, const char *type)
jfieldID GetBooleanMember(JNIEnv *env, jclass clazz, const char *class_name, const char *name)
jfieldID GetStaticIntMember(JNIEnv *env, jclass clazz, const char *class_name, const char *name)
jfieldID GetIntArrayMember(JNIEnv *env, jclass clazz, const char *class_name, const char *name)
~LocalFrame()
Pops a local reference frame with env->PopLocalFrame(NULL);.