/libnativehelper/ |
D | JniConstants.cpp | 81 static jclass findClass(JNIEnv* env, const char* name) { in findClass() argument 82 ScopedLocalRef<jclass> localClass(env, env->FindClass(name)); in findClass() 83 jclass result = reinterpret_cast<jclass>(env->NewGlobalRef(localClass.get())); in findClass() 91 void JniConstants::init(JNIEnv* env) { in init() argument 92 bidiRunClass = findClass(env, "java/text/Bidi$Run"); in init() 93 bigDecimalClass = findClass(env, "java/math/BigDecimal"); in init() 94 booleanClass = findClass(env, "java/lang/Boolean"); in init() 95 byteClass = findClass(env, "java/lang/Byte"); in init() 96 byteArrayClass = findClass(env, "[B"); in init() 97 calendarClass = findClass(env, "java/util/Calendar"); in init() [all …]
|
D | JNIHelp.cpp | 41 scoped_local_ref(C_JNIEnv* env, T localRef = NULL) in scoped_local_ref() argument 42 : mEnv(env), mLocalRef(localRef) in scoped_local_ref() 68 static jclass findClass(C_JNIEnv* env, const char* className) { in findClass() argument 69 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in findClass() 70 return (*env)->FindClass(e, className); in findClass() 73 extern "C" int jniRegisterNativeMethods(C_JNIEnv* env, const char* className, in jniRegisterNativeMethods() argument 76 JNIEnv* e = reinterpret_cast<JNIEnv*>(env); in jniRegisterNativeMethods() 80 scoped_local_ref<jclass> c(env, findClass(env, className)); in jniRegisterNativeMethods() 87 if ((*env)->RegisterNatives(e, c.get(), gMethods, numMethods) < 0) { in jniRegisterNativeMethods() 101 static bool getExceptionSummary(C_JNIEnv* env, jthrowable exception, std::string& result) { in getExceptionSummary() argument [all …]
|
D | toStringArray.cpp | 20 jobjectArray newStringArray(JNIEnv* env, size_t count) { in newStringArray() argument 21 return env->NewObjectArray(count, JniConstants::stringClass, NULL); in newStringArray() 44 jobjectArray toStringArray(JNIEnv* env, const char* const* strings) { in toStringArray() argument 47 return toStringArray(env, &counter, &getter); in toStringArray()
|
/libnativehelper/include/nativehelper/ |
D | JNIHelp.h | 45 int jniRegisterNativeMethods(C_JNIEnv* env, const char* className, const JNINativeMethod* gMethods,… 61 int jniThrowException(C_JNIEnv* env, const char* className, const char* msg); 66 int jniThrowNullPointerException(C_JNIEnv* env, const char* msg); 71 int jniThrowRuntimeException(C_JNIEnv* env, const char* msg); 76 int jniThrowIOException(C_JNIEnv* env, int errnum); 89 jobject jniCreateFileDescriptor(C_JNIEnv* env, int fd); 94 int jniGetFDFromFileDescriptor(C_JNIEnv* env, jobject fileDescriptor); 99 void jniSetFileDescriptorOfFD(C_JNIEnv* env, jobject fileDescriptor, int value); 104 jobject jniGetReferent(C_JNIEnv* env, jobject ref); 110 void jniLogException(C_JNIEnv* env, int priority, const char* tag, jthrowable exception); [all …]
|
D | toStringArray.h | 26 jobjectArray newStringArray(JNIEnv* env, size_t count); 29 jobjectArray toStringArray(JNIEnv* env, Counter* counter, Getter* getter) { in toStringArray() argument 31 jobjectArray result = newStringArray(env, count); in toStringArray() 36 ScopedLocalRef<jstring> s(env, env->NewStringUTF((*getter)(i))); in toStringArray() 37 if (env->ExceptionCheck()) { in toStringArray() 40 env->SetObjectArrayElement(result, i, s.get()); in toStringArray() 41 if (env->ExceptionCheck()) { in toStringArray() 63 inline jobjectArray toStringArray(JNIEnv* env, const std::vector<std::string>& strings) { in toStringArray() argument 66 return toStringArray<VectorCounter, VectorGetter>(env, &counter, &getter); in toStringArray() 69 JNIEXPORT jobjectArray toStringArray(JNIEnv* env, const char* const* strings);
|
D | ScopedStringChars.h | 33 ScopedStringChars(JNIEnv* env, jstring s) : env_(env), string_(s), size_(0) { in ScopedStringChars() argument 36 jniThrowNullPointerException(env, NULL); in ScopedStringChars() 38 chars_ = env->GetStringChars(string_, NULL); in ScopedStringChars() 40 size_ = env->GetStringLength(string_); in ScopedStringChars()
|
D | ScopedBytes.h | 31 ScopedBytes(JNIEnv* env, jobject object) in ScopedBytes() argument 32 : mEnv(env), mObject(object), mByteArray(NULL), mPtr(NULL) in ScopedBytes() 64 ScopedBytesRO(JNIEnv* env, jobject object) : ScopedBytes<true>(env, object) {} in ScopedBytesRO() argument 72 ScopedBytesRW(JNIEnv* env, jobject object) : ScopedBytes<false>(env, object) {} in ScopedBytesRW() argument
|
D | ScopedUtfChars.h | 34 ScopedUtfChars(JNIEnv* env, jstring s) : env_(env), string_(s) { in ScopedUtfChars() argument 37 jniThrowNullPointerException(env, NULL); in ScopedUtfChars() 39 utf_chars_ = env->GetStringUTFChars(s, NULL); in ScopedUtfChars()
|
D | ScopedPrimitiveArray.h | 29 explicit Scoped ## NAME ## ArrayRO(JNIEnv* env) \ 30 : mEnv(env), mJavaArray(NULL), mRawArray(NULL) {} \ 31 Scoped ## NAME ## ArrayRO(JNIEnv* env, PRIMITIVE_TYPE ## Array javaArray) \ 32 : mEnv(env), mJavaArray(javaArray), mRawArray(NULL) { \ 77 explicit Scoped ## NAME ## ArrayRW(JNIEnv* env) \ 78 : mEnv(env), mJavaArray(NULL), mRawArray(NULL) {} \ 79 Scoped ## NAME ## ArrayRW(JNIEnv* env, PRIMITIVE_TYPE ## Array javaArray) \ 80 : mEnv(env), mJavaArray(javaArray), mRawArray(NULL) { \
|
D | ScopedLocalFrame.h | 24 ScopedLocalFrame(JNIEnv* env) : mEnv(env) { in ScopedLocalFrame() argument
|
D | ScopedLocalRef.h | 29 ScopedLocalRef(JNIEnv* env, T localRef) : mEnv(env), mLocalRef(localRef) { in ScopedLocalRef() argument
|
D | JniConstants.h | 40 static void init(JNIEnv* env);
|
D | jni.h | 1063 jint GetEnv(void** env, jint version) in GetEnv() 1064 { return functions->GetEnv(this, env, version); } in GetEnv()
|