ART: Expose jni_binder's FindClass
Required for the CTS agent.
Bug: 32072923
Test: m test-art-host
Change-Id: I37764b0646fdb0df7ec9dd544d1dffdc909e269b
diff --git a/test/ti-agent/jni_binder.cc b/test/ti-agent/jni_binder.cc
index b66c2c7..32236de 100644
--- a/test/ti-agent/jni_binder.cc
+++ b/test/ti-agent/jni_binder.cc
@@ -174,12 +174,7 @@
class_loader));
}
-// Find the given classname. First try the implied classloader, then the system classloader,
-// then use JVMTI to find all classloaders.
-static jclass FindClass(jvmtiEnv* jvmti_env,
- JNIEnv* env,
- const char* class_name,
- jobject class_loader) {
+jclass FindClass(jvmtiEnv* jvmti_env, JNIEnv* env, const char* class_name, jobject class_loader) {
if (class_loader != nullptr) {
return FindClassWithClassLoader(env, class_name, class_loader);
}
diff --git a/test/ti-agent/jni_binder.h b/test/ti-agent/jni_binder.h
index 6f96257..e998dc5 100644
--- a/test/ti-agent/jni_binder.h
+++ b/test/ti-agent/jni_binder.h
@@ -22,6 +22,10 @@
namespace art {
+// Find the given classname. First try the implied classloader, then the system classloader,
+// then use JVMTI to find all classloaders.
+jclass FindClass(jvmtiEnv* jvmti_env, JNIEnv* env, const char* class_name, jobject class_loader);
+
// Load the class through JNI. Inspect it, find all native methods. Construct the corresponding
// mangled name, run dlsym and bind the method.
//