summaryrefslogtreecommitdiff
path: root/runtime/native/java_lang_Class.cc
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2014-03-13 23:45:53 -0700
committer Ian Rogers <irogers@google.com> 2014-03-14 11:28:10 -0700
commit53b8b09fc80329539585dcf43657bc5f4ecefdff (patch)
treecac0f82fbb89bd907104e3fed6c36203e11a3de0 /runtime/native/java_lang_Class.cc
parent0dea9872082bc3e576ed6cefed86b0d6c0c45ffd (diff)
Refactor reflective method invocation.
Move invocation code out of JNI internal into reflection, including ArgArray code. Make reflective invocation use the ArgArray to build arguments rather than allocating a jvalue[] and unboxing arguments into that. Move reflection part of jni_internal_test into reflection_test. Make greater use of fast JNI. Change-Id: Ib381372df5f9a83679e30e7275de24fa0e6b1057
Diffstat (limited to 'runtime/native/java_lang_Class.cc')
-rw-r--r--runtime/native/java_lang_Class.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/native/java_lang_Class.cc b/runtime/native/java_lang_Class.cc
index 8bf36e7e37..6daf9a951a 100644
--- a/runtime/native/java_lang_Class.cc
+++ b/runtime/native/java_lang_Class.cc
@@ -45,7 +45,7 @@ static mirror::Class* DecodeClass(const ScopedFastNativeObjectAccess& soa, jobje
// "name" is in "binary name" format, e.g. "dalvik.system.Debug$1".
static jclass Class_classForName(JNIEnv* env, jclass, jstring javaName, jboolean initialize,
jobject javaLoader) {
- ScopedObjectAccess soa(env);
+ ScopedFastNativeObjectAccess soa(env);
ScopedUtfChars name(env, javaName);
if (name.c_str() == nullptr) {
return nullptr;
@@ -96,7 +96,7 @@ static jobjectArray Class_getProxyInterfaces(JNIEnv* env, jobject javaThis) {
}
static JNINativeMethod gMethods[] = {
- NATIVE_METHOD(Class, classForName, "(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;"),
+ NATIVE_METHOD(Class, classForName, "!(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;"),
NATIVE_METHOD(Class, getNameNative, "!()Ljava/lang/String;"),
NATIVE_METHOD(Class, getProxyInterfaces, "!()[Ljava/lang/Class;"),
};