/libcore/luni/src/main/native/ |
H A D | Register.cpp | 27 JNIEnv* env; local 28 if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) { 33 ScopedLocalFrame localFrame(env); 35 #define REGISTER(FN) extern void FN(JNIEnv*); FN(env)
|
H A D | java_nio_ByteOrder.cpp | 30 void register_java_nio_ByteOrder(JNIEnv* env) { argument 31 jniRegisterNativeMethods(env, "java/nio/ByteOrder", gMethods, NELEM(gMethods));
|
H A D | libcore_io_AsynchronousCloseMonitor.cpp | 24 static void AsynchronousCloseMonitor_signalBlockedThreads(JNIEnv* env, jclass, jobject javaFd) { argument 25 int fd = jniGetFDFromFileDescriptor(env, javaFd); 32 void register_libcore_io_AsynchronousCloseMonitor(JNIEnv* env) { argument 34 jniRegisterNativeMethods(env, "libcore/io/AsynchronousCloseMonitor", gMethods, NELEM(gMethods));
|
H A D | sun_misc_Unsafe.cpp | 22 static jobject Unsafe_allocateInstance(JNIEnv* env, jclass, jclass c) { argument 23 return env->AllocObject(c); 29 void register_sun_misc_Unsafe(JNIEnv* env) { argument 30 jniRegisterNativeMethods(env, "sun/misc/Unsafe", gMethods, NELEM(gMethods));
|
H A D | ExecStrings.cpp | 26 ExecStrings::ExecStrings(JNIEnv* env, jobjectArray java_string_array) argument 27 : env_(env), java_array_(java_string_array), array_(NULL) {
|
H A D | JniException.cpp | 22 void jniThrowExceptionWithErrno(JNIEnv* env, const char* exceptionClassName, int error) { argument 24 jniThrowException(env, exceptionClassName, jniStrError(error, buf, sizeof(buf))); 27 void jniThrowOutOfMemoryError(JNIEnv* env, const char* message) { argument 28 jniThrowException(env, "java/lang/OutOfMemoryError", message); 31 void jniThrowSocketException(JNIEnv* env, int error) { argument 32 jniThrowExceptionWithErrno(env, "java/net/SocketException", error);
|
H A D | android_system_OsConstants.cpp | 53 static void initConstant(JNIEnv* env, jclass c, const char* fieldName, int value) { argument 54 jfieldID field = env->GetStaticFieldID(c, fieldName, "I"); 55 env->SetStaticIntField(c, field, value); 58 static void OsConstants_initConstants(JNIEnv* env, jclass c) { argument 59 initConstant(env, c, "AF_INET", AF_INET); 60 initConstant(env, c, "AF_INET6", AF_INET6); 61 initConstant(env, c, "AF_UNIX", AF_UNIX); 62 initConstant(env, c, "AF_UNSPEC", AF_UNSPEC); 63 initConstant(env, c, "AI_ADDRCONFIG", AI_ADDRCONFIG); 64 initConstant(env, 626 register_android_system_OsConstants(JNIEnv* env) argument [all...] |
H A D | java_io_FileDescriptor.cpp | 35 void register_java_io_FileDescriptor(JNIEnv* env) { argument 36 jniRegisterNativeMethods(env, "java/io/FileDescriptor", gMethods, NELEM(gMethods));
|
H A D | java_lang_Double.cpp | 48 void register_java_lang_Double(JNIEnv* env) { argument 49 jniRegisterNativeMethods(env, "java/lang/Double", gMethods, NELEM(gMethods));
|
H A D | java_lang_Float.cpp | 48 void register_java_lang_Float(JNIEnv* env) { argument 49 jniRegisterNativeMethods(env, "java/lang/Float", gMethods, NELEM(gMethods));
|
H A D | IcuUtilities.cpp | 31 jobjectArray fromStringEnumeration(JNIEnv* env, UErrorCode& status, const char* provider, StringEnumeration* se) { argument 32 if (maybeThrowIcuException(env, provider, status)) { 37 if (maybeThrowIcuException(env, "StringEnumeration::count", status)) { 41 jobjectArray result = env->NewObjectArray(count, JniConstants::stringClass, NULL); 44 if (maybeThrowIcuException(env, "StringEnumeration::snext", status)) { 47 ScopedLocalRef<jstring> javaString(env, env->NewString(string->getBuffer(), string->length())); 48 env->SetObjectArrayElement(result, i, javaString.get()); 53 bool maybeThrowIcuException(JNIEnv* env, const char* function, UErrorCode error) { argument 67 jniThrowExceptionFmt(env, exceptionClas [all...] |
H A D | NetFd.h | 25 NetFd(JNIEnv* env, jobject fileDescriptor) argument 26 : mEnv(env), mFileDescriptor(fileDescriptor), mFd(-1)
|
H A D | java_util_zip_Adler32.cpp | 26 static jlong Adler32_updateImpl(JNIEnv* env, jobject, jbyteArray byteArray, int off, int len, jlong crc) { argument 27 ScopedByteArrayRO bytes(env, byteArray); 43 void register_java_util_zip_Adler32(JNIEnv* env) { argument 44 jniRegisterNativeMethods(env, "java/util/zip/Adler32", gMethods, NELEM(gMethods));
|
H A D | java_util_zip_CRC32.cpp | 26 static jlong CRC32_updateImpl(JNIEnv* env, jobject, jbyteArray byteArray, int off, int len, jlong crc) { argument 27 ScopedByteArrayRO bytes(env, byteArray); 43 void register_java_util_zip_CRC32(JNIEnv* env) { argument 44 jniRegisterNativeMethods(env, "java/util/zip/CRC32", gMethods, NELEM(gMethods));
|
H A D | libcore_icu_DateIntervalFormat.cpp | 27 static jlong DateIntervalFormat_createDateIntervalFormat(JNIEnv* env, jclass, jstring javaSkeleton, jstring javaLocaleName, jstring javaTzName) { argument 28 ScopedIcuLocale icuLocale(env, javaLocaleName); 33 ScopedJavaUnicodeString skeletonHolder(env, javaSkeleton); 40 if (maybeThrowIcuException(env, "DateIntervalFormat::createInstance", status)) { 44 ScopedJavaUnicodeString tzNameHolder(env, javaTzName); 57 static jstring DateIntervalFormat_formatDateInterval(JNIEnv* env, jclass, jlong address, jlong fromDate, jlong toDate) { argument 65 if (maybeThrowIcuException(env, "DateIntervalFormat::format", status)) { 69 return env->NewString(s.getBuffer(), s.length()); 77 void register_libcore_icu_DateIntervalFormat(JNIEnv* env) { argument 78 jniRegisterNativeMethods(env, "libcor [all...] |
H A D | libcore_icu_NativeIDN.cpp | 35 static jstring NativeIDN_convertImpl(JNIEnv* env, jclass, jstring javaSrc, jint flags, jboolean toAscii) { argument 36 ScopedStringChars src(env, javaSrc); 46 jniThrowException(env, "java/lang/IllegalArgumentException", u_errorName(status)); 59 return env->NewString(&dst[0], resultLength); 65 void register_libcore_icu_NativeIDN(JNIEnv* env) { argument 66 jniRegisterNativeMethods(env, "libcore/icu/NativeIDN", gMethods, NELEM(gMethods));
|
H A D | libcore_icu_NativeNormalizer.cpp | 26 static jstring NativeNormalizer_normalizeImpl(JNIEnv* env, jclass, jstring s, jint intMode) { argument 27 ScopedJavaUnicodeString src(env, s); 35 maybeThrowIcuException(env, "Normalizer::normalize", status); 36 return dst.isBogus() ? NULL : env->NewString(dst.getBuffer(), dst.length()); 39 static jboolean NativeNormalizer_isNormalizedImpl(JNIEnv* env, jclass, jstring s, jint intMode) { argument 40 ScopedJavaUnicodeString src(env, s); 47 maybeThrowIcuException(env, "Normalizer::isNormalized", status); 55 void register_libcore_icu_NativeNormalizer(JNIEnv* env) { argument 56 jniRegisterNativeMethods(env, "libcore/icu/NativeNormalizer", gMethods, NELEM(gMethods));
|
H A D | libcore_icu_NativePluralRules.cpp | 36 static jlong NativePluralRules_forLocaleImpl(JNIEnv* env, jclass, jstring javaLocaleName) { argument 39 std::string localeName(ScopedUtfChars(env, javaLocaleName).c_str()); 54 maybeThrowIcuException(env, "PluralRules::forLocale", status); 80 void register_libcore_icu_NativePluralRules(JNIEnv* env) { argument 81 jniRegisterNativeMethods(env, "libcore/icu/NativePluralRules", gMethods, NELEM(gMethods));
|
H A D | libcore_icu_Transliterator.cpp | 30 static jlong Transliterator_create(JNIEnv* env, jclass, jstring javaId) { argument 31 ScopedJavaUnicodeString id(env, javaId); 37 if (maybeThrowIcuException(env, "Transliterator::createInstance", status)) { 47 static jobjectArray Transliterator_getAvailableIDs(JNIEnv* env, jclass) { argument 50 return fromStringEnumeration(env, status, "Transliterator::getAvailableIDs", e); 53 static jstring Transliterator_transliterate(JNIEnv* env, jclass, jlong peer, jstring javaString) { argument 55 ScopedJavaUnicodeString string(env, javaString); 62 return env->NewString(s.getBuffer(), s.length()); 71 void register_libcore_icu_Transliterator(JNIEnv* env) { argument 72 jniRegisterNativeMethods(env, "libcor [all...] |
H A D | valueOf.cpp | 24 static jobject valueOf(JNIEnv* env, jclass c, const char* signature, const T& value) { argument 25 static jmethodID valueOfMethod = env->GetStaticMethodID(c, "valueOf", signature); 26 return env->CallStaticObjectMethod(c, valueOfMethod, value); 29 jobject booleanValueOf(JNIEnv* env, jboolean value) { argument 30 return valueOf(env, JniConstants::booleanClass, "(Z)Ljava/lang/Boolean;", value); 33 jobject doubleValueOf(JNIEnv* env, jdouble value) { argument 34 return valueOf(env, JniConstants::doubleClass, "(D)Ljava/lang/Double;", value); 37 jobject integerValueOf(JNIEnv* env, jint value) { argument 38 return valueOf(env, JniConstants::integerClass, "(I)Ljava/lang/Integer;", value); 41 jobject longValueOf(JNIEnv* env, jlon argument 45 booleanValue(JNIEnv* env, jobject javaLangBoolean) argument 50 intValue(JNIEnv* env, jobject javaLangInteger) argument [all...] |
H A D | ZipUtilities.cpp | 23 void throwExceptionForZlibError(JNIEnv* env, const char* exceptionClassName, int error, argument 26 jniThrowOutOfMemoryError(env, NULL); 28 jniThrowException(env, exceptionClassName, stream->stream.msg); 30 jniThrowException(env, exceptionClassName, zError(error)); 44 void NativeZipStream::setDictionary(JNIEnv* env, jbyteArray javaDictionary, int off, int len, argument 48 jniThrowOutOfMemoryError(env, NULL); 51 env->GetByteArrayRegion(javaDictionary, off, len, &dictionaryBytes[0]); 60 throwExceptionForZlibError(env, "java/lang/IllegalArgumentException", err, NULL); 66 void NativeZipStream::setInput(JNIEnv* env, jbyteArray buf, jint off, jint len) { argument 70 jniThrowOutOfMemoryError(env, NUL [all...] |
H A D | java_util_regex_Pattern.cpp | 65 static void throwPatternSyntaxException(JNIEnv* env, UErrorCode status, jstring pattern, UParseError error) { argument 66 static jmethodID method = env->GetMethodID(JniConstants::patternSyntaxExceptionClass, 68 jstring message = env->NewStringUTF(regexDetailMessage(status)); 70 jobject exception = env->NewObject(exceptionClass, method, message, pattern, error.offset); 71 env->Throw(reinterpret_cast<jthrowable>(exception)); 78 static jlong Pattern_compileImpl(JNIEnv* env, jclass, jstring javaRegex, jint flags) { argument 85 ScopedJavaUnicodeString regex(env, javaRegex); 92 throwPatternSyntaxException(env, status, javaRegex, error); 101 void register_java_util_regex_Pattern(JNIEnv* env) { argument 102 jniRegisterNativeMethods(env, "jav [all...] |
/libcore/dalvik/src/main/native/ |
H A D | org_apache_harmony_dalvik_NativeTestTarget.cpp | 41 int register_org_apache_harmony_dalvik_NativeTestTarget(JNIEnv* env) { argument 42 return jniRegisterNativeMethods(env, "org/apache/harmony/dalvik/NativeTestTarget", gMethods, NELEM(gMethods));
|
/libcore/include/ |
H A D | ScopedIcuLocale.h | 26 ScopedIcuLocale(JNIEnv* env, jstring javaLocaleName) : mEnv(env) { argument 34 const ScopedUtfChars localeName(env, javaLocaleName);
|
H A D | ScopedJavaUnicodeString.h | 28 ScopedJavaUnicodeString(JNIEnv* env, jstring s) : mEnv(env), mString(s) { argument 32 mChars = env->GetStringChars(mString, NULL); 33 const int32_t charCount = env->GetStringLength(mString);
|