8159145: Add JVMTI function GetNamedModule
Summary: Introduce function GetNamedModule with a jtreg test coverage
Reviewed-by: alanb, ctornqvi, hseigel, jiangli, dholmes, dcubed
--- a/jdk/src/java.base/share/native/include/jvmti.h Fri Jul 08 12:17:10 2016 -0700
+++ b/jdk/src/java.base/share/native/include/jvmti.h Sat Jul 09 17:45:16 2016 -0700
@@ -1217,8 +1217,11 @@
jmethodID method,
jlocation location);
- /* 40 : RESERVED */
- void *reserved40;
+ /* 40 : Get Named Module */
+ jvmtiError (JNICALL *GetNamedModule) (jvmtiEnv* env,
+ jobject class_loader,
+ const char* package_name,
+ jobject* module_ptr);
/* 41 : Set Field Access Watch */
jvmtiError (JNICALL *SetFieldAccessWatch) (jvmtiEnv* env,
@@ -2146,6 +2149,12 @@
return functions->GetAllModules(this, module_count_ptr, modules_ptr);
}
+ jvmtiError GetNamedModule(jobject class_loader,
+ const char* package_name,
+ jobject* module_ptr) {
+ return functions->GetNamedModule(this, class_loader, package_name, module_ptr);
+ }
+
jvmtiError GetLoadedClasses(jint* class_count_ptr,
jclass** classes_ptr) {
return functions->GetLoadedClasses(this, class_count_ptr, classes_ptr);