changeset 13360:1cfb867aa558

Move Module and Layer to java.lang
author alanb
date Tue, 28 Mar 2017 13:28:24 +0100
parents 23e18d2648da
children c1d6cbb4a84e
files src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ExportingClassLoader.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/JLModule.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/JLRModule.java src/share/vm/classfile/modules.cpp src/share/vm/classfile/vmSymbols.hpp src/share/vm/prims/jvmti.xml test/compiler/jvmci/common/CTVMUtilities.java test/runtime/classFileParserBug/fakeMethodAccessor.jasm test/runtime/getSysPackage/GetSysPkgTest.java test/runtime/modules/AccModuleTest.java test/runtime/modules/AccessCheck/AccessExportTwice.java test/runtime/modules/AccessCheck/AccessReadTwice.java test/runtime/modules/AccessCheck/CheckRead.java test/runtime/modules/AccessCheck/DiffCL_CheckRead.java test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java test/runtime/modules/AccessCheck/DiffCL_Umod.java test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java test/runtime/modules/AccessCheck/ExpQualOther.java test/runtime/modules/AccessCheck/ExpQualToM1.java test/runtime/modules/AccessCheck/ExpUnqual.java test/runtime/modules/AccessCheck/ExportAllUnnamed.java test/runtime/modules/AccessCheck/PkgNotExp.java test/runtime/modules/AccessCheck/Umod.java test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java test/runtime/modules/AccessCheck/UmodUPkg.java test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java test/runtime/modules/AccessCheck/Umod_ExpQualOther.java test/runtime/modules/AccessCheck/Umod_ExpUnqual.java test/runtime/modules/AccessCheck/Umod_PkgNotExp.java test/runtime/modules/AccessCheck/p1/c1ReadEdge.java test/runtime/modules/AccessCheck/p1/c1ReadEdgeDiffLoader.java test/runtime/modules/AccessCheck/p3/c3ReadEdge.jcod test/runtime/modules/AccessCheck/p3/c3ReadEdgeDiffLoader.jcod test/runtime/modules/AccessCheck/p4/c4.java test/runtime/modules/AccessCheckAllUnnamed.java test/runtime/modules/AccessCheckExp.java test/runtime/modules/AccessCheckJavaBase.java test/runtime/modules/AccessCheckRead.java test/runtime/modules/AccessCheckSuper.java test/runtime/modules/AccessCheckUnnamed.java test/runtime/modules/AccessCheckWorks.java test/runtime/modules/CCE_module_msg.java test/runtime/modules/ExportTwice.java test/runtime/modules/JVMAddModuleExportToAllUnnamed.java test/runtime/modules/JVMAddModuleExports.java test/runtime/modules/JVMAddModuleExportsToAll.java test/runtime/modules/JVMAddModulePackage.java test/runtime/modules/JVMAddReadsModule.java test/runtime/modules/JVMDefineModule.java test/runtime/modules/JVMGetModuleByPkgName.java test/runtime/modules/LoadUnloadModuleStress.java test/runtime/modules/ModuleHelper.java test/runtime/modules/ModuleStress/ModuleNonBuiltinCLMain.java test/runtime/modules/ModuleStress/ModuleSameCLMain.java test/runtime/modules/ModuleStress/src/jdk.test/test/Main.java test/runtime/modules/ModuleStress/src/jdk.test/test/MainGC.java test/runtime/modules/getModuleJNI/GetModule.java test/runtime/modules/java.base/java/lang/ModuleHelper.java test/runtime/modules/java.base/java/lang/reflect/ModuleHelper.java test/serviceability/jdwp/AllModulesCommandTestDebuggee.java test/serviceability/jvmti/AddModuleExportsAndOpens/MyPackage/AddModuleExportsAndOpensTest.java test/serviceability/jvmti/AddModuleExportsAndOpens/libAddModuleExportsAndOpensTest.c test/serviceability/jvmti/AddModuleReads/MyPackage/AddModuleReadsTest.java test/serviceability/jvmti/AddModuleReads/libAddModuleReadsTest.c test/serviceability/jvmti/AddModuleUsesAndProvides/MyPackage/AddModuleUsesAndProvidesTest.java test/serviceability/jvmti/AddModuleUsesAndProvides/libAddModuleUsesAndProvidesTest.c test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java test/serviceability/jvmti/GetModulesInfo/libJvmtiGetAllModulesTest.c test/serviceability/jvmti/GetNamedModule/libGetNamedModuleTest.c
diffstat 77 files changed, 455 insertions(+), 522 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ExportingClassLoader.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ExportingClassLoader.java	Tue Mar 28 13:28:24 2017 +0100
@@ -29,14 +29,14 @@
 public class ExportingClassLoader extends ClassLoader {
     public ExportingClassLoader() {
         if (!GraalTest.Java8OrEarlier) {
-            JLRModule.fromClass(getClass()).exportAllPackagesTo(JLRModule.getUnnamedModuleFor(this));
+            JLModule.fromClass(getClass()).exportAllPackagesTo(JLModule.getUnnamedModuleFor(this));
         }
     }
 
     public ExportingClassLoader(ClassLoader parent) {
         super(parent);
         if (!GraalTest.Java8OrEarlier) {
-            JLRModule.fromClass(getClass()).exportAllPackagesTo(JLRModule.getUnnamedModuleFor(this));
+            JLModule.fromClass(getClass()).exportAllPackagesTo(JLModule.getUnnamedModuleFor(this));
         }
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/JLModule.java	Tue Mar 28 13:28:24 2017 +0100
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package org.graalvm.compiler.test;
+
+import java.lang.reflect.Method;
+
+/**
+ * Facade for the {@code java.lang.Module} class introduced in JDK9 that allows tests to be
+ * developed against JDK8 but use module logic if deployed on JDK9.
+ */
+public class JLModule {
+
+    static {
+        if (GraalTest.Java8OrEarlier) {
+            throw new AssertionError("Use of " + JLModule.class + " only allowed if " + GraalTest.class.getName() + ".JDK8OrEarlier is false");
+        }
+    }
+
+    private final Object realModule;
+
+    public JLModule(Object module) {
+        this.realModule = module;
+    }
+
+    private static final Class<?> moduleClass;
+    private static final Method getModuleMethod;
+    private static final Method getUnnamedModuleMethod;
+    private static final Method getPackagesMethod;
+    private static final Method isExportedMethod;
+    private static final Method isExported2Method;
+    private static final Method addExportsMethod;
+    static {
+        try {
+            moduleClass = Class.forName("java.lang.Module");
+            getModuleMethod = Class.class.getMethod("getModule");
+            getUnnamedModuleMethod = ClassLoader.class.getMethod("getUnnamedModule");
+            getPackagesMethod = moduleClass.getMethod("getPackages");
+            isExportedMethod = moduleClass.getMethod("isExported", String.class);
+            isExported2Method = moduleClass.getMethod("isExported", String.class, moduleClass);
+            addExportsMethod = moduleClass.getMethod("addExports", String.class, moduleClass);
+        } catch (Exception e) {
+            throw new AssertionError(e);
+        }
+    }
+
+    public static JLModule fromClass(Class<?> cls) {
+        try {
+            return new JLModule(getModuleMethod.invoke(cls));
+        } catch (Exception e) {
+            throw new AssertionError(e);
+        }
+    }
+
+    public static JLModule getUnnamedModuleFor(ClassLoader cl) {
+        try {
+            return new JLModule(getUnnamedModuleMethod.invoke(cl));
+        } catch (Exception e) {
+            throw new AssertionError(e);
+        }
+    }
+
+    /**
+     * Exports all packages in this module to a given module.
+     */
+    public void exportAllPackagesTo(JLModule module) {
+        if (this != module) {
+            for (String pkg : getPackages()) {
+                // Export all JVMCI packages dynamically instead
+                // of requiring a long list of -XaddExports
+                // options on the JVM command line.
+                if (!isExported(pkg, module)) {
+                    addExports(pkg, module);
+                }
+            }
+        }
+    }
+
+    public String[] getPackages() {
+        try {
+            return (String[]) getPackagesMethod.invoke(realModule);
+        } catch (Exception e) {
+            throw new AssertionError(e);
+        }
+    }
+
+    public boolean isExported(String pn) {
+        try {
+            return (Boolean) isExportedMethod.invoke(realModule, pn);
+        } catch (Exception e) {
+            throw new AssertionError(e);
+        }
+    }
+
+    public boolean isExported(String pn, JLModule other) {
+        try {
+            return (Boolean) isExported2Method.invoke(realModule, pn, other.realModule);
+        } catch (Exception e) {
+            throw new AssertionError(e);
+        }
+    }
+
+    public void addExports(String pn, JLModule other) {
+        try {
+            addExportsMethod.invoke(realModule, pn, other.realModule);
+        } catch (Exception e) {
+            throw new AssertionError(e);
+        }
+    }
+}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/JLRModule.java	Fri Mar 24 16:56:51 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package org.graalvm.compiler.test;
-
-import java.lang.reflect.Method;
-
-/**
- * Facade for the {@code java.lang.reflect.Module} class introduced in JDK9 that allows tests to be
- * developed against JDK8 but use module logic if deployed on JDK9.
- */
-public class JLRModule {
-
-    static {
-        if (GraalTest.Java8OrEarlier) {
-            throw new AssertionError("Use of " + JLRModule.class + " only allowed if " + GraalTest.class.getName() + ".JDK8OrEarlier is false");
-        }
-    }
-
-    private final Object realModule;
-
-    public JLRModule(Object module) {
-        this.realModule = module;
-    }
-
-    private static final Class<?> moduleClass;
-    private static final Method getModuleMethod;
-    private static final Method getUnnamedModuleMethod;
-    private static final Method getPackagesMethod;
-    private static final Method isExportedMethod;
-    private static final Method isExported2Method;
-    private static final Method addExportsMethod;
-    static {
-        try {
-            moduleClass = Class.forName("java.lang.reflect.Module");
-            getModuleMethod = Class.class.getMethod("getModule");
-            getUnnamedModuleMethod = ClassLoader.class.getMethod("getUnnamedModule");
-            getPackagesMethod = moduleClass.getMethod("getPackages");
-            isExportedMethod = moduleClass.getMethod("isExported", String.class);
-            isExported2Method = moduleClass.getMethod("isExported", String.class, moduleClass);
-            addExportsMethod = moduleClass.getMethod("addExports", String.class, moduleClass);
-        } catch (Exception e) {
-            throw new AssertionError(e);
-        }
-    }
-
-    public static JLRModule fromClass(Class<?> cls) {
-        try {
-            return new JLRModule(getModuleMethod.invoke(cls));
-        } catch (Exception e) {
-            throw new AssertionError(e);
-        }
-    }
-
-    public static JLRModule getUnnamedModuleFor(ClassLoader cl) {
-        try {
-            return new JLRModule(getUnnamedModuleMethod.invoke(cl));
-        } catch (Exception e) {
-            throw new AssertionError(e);
-        }
-    }
-
-    /**
-     * Exports all packages in this module to a given module.
-     */
-    public void exportAllPackagesTo(JLRModule module) {
-        if (this != module) {
-            for (String pkg : getPackages()) {
-                // Export all JVMCI packages dynamically instead
-                // of requiring a long list of -XaddExports
-                // options on the JVM command line.
-                if (!isExported(pkg, module)) {
-                    addExports(pkg, module);
-                }
-            }
-        }
-    }
-
-    public String[] getPackages() {
-        try {
-            return (String[]) getPackagesMethod.invoke(realModule);
-        } catch (Exception e) {
-            throw new AssertionError(e);
-        }
-    }
-
-    public boolean isExported(String pn) {
-        try {
-            return (Boolean) isExportedMethod.invoke(realModule, pn);
-        } catch (Exception e) {
-            throw new AssertionError(e);
-        }
-    }
-
-    public boolean isExported(String pn, JLRModule other) {
-        try {
-            return (Boolean) isExported2Method.invoke(realModule, pn, other.realModule);
-        } catch (Exception e) {
-            throw new AssertionError(e);
-        }
-    }
-
-    public void addExports(String pn, JLRModule other) {
-        try {
-            addExportsMethod.invoke(realModule, pn, other.realModule);
-        } catch (Exception e) {
-            throw new AssertionError(e);
-        }
-    }
-}
--- a/src/share/vm/classfile/modules.cpp	Fri Mar 24 16:56:51 2017 +0000
+++ b/src/share/vm/classfile/modules.cpp	Tue Mar 28 13:28:24 2017 +0100
@@ -100,7 +100,7 @@
   Handle module_h(THREAD, JNIHandles::resolve(module));
   if (!java_lang_reflect_Module::is_instance(module_h())) {
     THROW_MSG_NULL(vmSymbols::java_lang_IllegalArgumentException(),
-                   "module is not an instance of type java.lang.reflect.Module");
+                   "module is not an instance of type java.lang.Module");
   }
   return java_lang_reflect_Module::module_entry(module_h(), CHECK_NULL);
 }
@@ -286,7 +286,7 @@
   Handle module_handle(THREAD, JNIHandles::resolve(module));
   if (!java_lang_reflect_Module::is_instance(module_handle())) {
     THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
-              "module is not an instance of type java.lang.reflect.Module");
+              "module is not an instance of type java.lang.Module");
   }
 
   char* module_name = get_module_name(module_handle(), CHECK);
@@ -469,14 +469,14 @@
   Handle module_handle(THREAD, JNIHandles::resolve(module));
   if (!java_lang_reflect_Module::is_instance(module_handle())) {
     THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
-              "module is not an instance of type java.lang.reflect.Module");
+              "module is not an instance of type java.lang.Module");
   }
 
   // Ensure that this is an unnamed module
   oop name = java_lang_reflect_Module::name(module_handle());
   if (name != NULL) {
     THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
-              "boot loader's unnamed module's java.lang.reflect.Module has a name");
+              "boot loader's unnamed module's java.lang.Module has a name");
   }
 
   // Validate java_base's loader is the boot loader.
@@ -627,7 +627,7 @@
   oop module = java_lang_Class::module(mirror);
 
   assert(module != NULL, "java.lang.Class module field not set");
-  assert(java_lang_reflect_Module::is_instance(module), "module is not an instance of type java.lang.reflect.Module");
+  assert(java_lang_reflect_Module::is_instance(module), "module is not an instance of type java.lang.Module");
 
   if (log_is_enabled(Debug, modules)) {
     ResourceMark rm(THREAD);
--- a/src/share/vm/classfile/vmSymbols.hpp	Fri Mar 24 16:56:51 2017 +0000
+++ b/src/share/vm/classfile/vmSymbols.hpp	Tue Mar 28 13:28:24 2017 +0100
@@ -90,7 +90,7 @@
   template(java_lang_reflect_Method,                  "java/lang/reflect/Method")                 \
   template(java_lang_reflect_Constructor,             "java/lang/reflect/Constructor")            \
   template(java_lang_reflect_Field,                   "java/lang/reflect/Field")                  \
-  template(java_lang_reflect_Module,                  "java/lang/reflect/Module")                 \
+  template(java_lang_reflect_Module,                  "java/lang/Module")                 \
   template(java_lang_reflect_Parameter,               "java/lang/reflect/Parameter")              \
   template(java_lang_reflect_Array,                   "java/lang/reflect/Array")                  \
   template(java_lang_StringBuffer,                    "java/lang/StringBuffer")                   \
@@ -450,7 +450,7 @@
   template(getModule_name,                            "getModule")                                \
   template(input_stream_void_signature,               "(Ljava/io/InputStream;)V")                 \
   template(definePackage_name,                        "definePackage")                            \
-  template(definePackage_signature,                   "(Ljava/lang/String;Ljava/lang/reflect/Module;)Ljava/lang/Package;") \
+  template(definePackage_signature,                   "(Ljava/lang/String;Ljava/lang/Module;)Ljava/lang/Package;") \
   template(defineOrCheckPackage_name,                 "defineOrCheckPackage")                     \
   template(defineOrCheckPackage_signature,            "(Ljava/lang/String;Ljava/util/jar/Manifest;Ljava/net/URL;)Ljava/lang/Package;") \
   template(fileToEncodedURL_name,                     "fileToEncodedURL")                         \
@@ -532,7 +532,7 @@
   template(void_class_signature,                      "()Ljava/lang/Class;")                                      \
   template(void_class_array_signature,                "()[Ljava/lang/Class;")                                     \
   template(void_string_signature,                     "()Ljava/lang/String;")                                     \
-  template(void_module_signature,                     "()Ljava/lang/reflect/Module;")                             \
+  template(void_module_signature,                     "()Ljava/lang/Module;")                             \
   template(object_array_object_signature,             "([Ljava/lang/Object;)Ljava/lang/Object;")                  \
   template(object_object_array_object_signature,      "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;")\
   template(exception_void_signature,                  "(Ljava/lang/Exception;)V")                                 \
@@ -552,7 +552,7 @@
   template(reference_signature,                       "Ljava/lang/ref/Reference;")                                \
   template(sun_misc_Cleaner_signature,                "Lsun/misc/Cleaner;")                                       \
   template(executable_signature,                      "Ljava/lang/reflect/Executable;")                           \
-  template(module_signature,                          "Ljava/lang/reflect/Module;")                               \
+  template(module_signature,                          "Ljava/lang/Module;")                               \
   template(concurrenthashmap_signature,               "Ljava/util/concurrent/ConcurrentHashMap;")                 \
   template(String_StringBuilder_signature,            "(Ljava/lang/String;)Ljava/lang/StringBuilder;")            \
   template(int_StringBuilder_signature,               "(I)Ljava/lang/StringBuilder;")                             \
@@ -642,16 +642,16 @@
   template(jdk_internal_module_Modules,                "jdk/internal/module/Modules")                             \
   template(jdk_internal_vm_VMSupport,                  "jdk/internal/vm/VMSupport")                               \
   template(addReads_name,                              "addReads")                                                \
-  template(addReads_signature,                         "(Ljava/lang/reflect/Module;Ljava/lang/reflect/Module;)V") \
+  template(addReads_signature,                         "(Ljava/lang/Module;Ljava/lang/Module;)V") \
   template(addExports_name,                            "addExports")                                              \
   template(addOpens_name,                              "addOpens")                                                \
-  template(addExports_signature,                       "(Ljava/lang/reflect/Module;Ljava/lang/String;Ljava/lang/reflect/Module;)V") \
+  template(addExports_signature,                       "(Ljava/lang/Module;Ljava/lang/String;Ljava/lang/Module;)V") \
   template(addUses_name,                               "addUses")                                                 \
-  template(addUses_signature,                          "(Ljava/lang/reflect/Module;Ljava/lang/Class;)V")          \
+  template(addUses_signature,                          "(Ljava/lang/Module;Ljava/lang/Class;)V")          \
   template(addProvides_name,                           "addProvides")                                             \
-  template(addProvides_signature,                      "(Ljava/lang/reflect/Module;Ljava/lang/Class;Ljava/lang/Class;)V") \
+  template(addProvides_signature,                      "(Ljava/lang/Module;Ljava/lang/Class;Ljava/lang/Class;)V") \
   template(transformedByAgent_name,                    "transformedByAgent")                                      \
-  template(transformedByAgent_signature,               "(Ljava/lang/reflect/Module;)V")                           \
+  template(transformedByAgent_signature,               "(Ljava/lang/Module;)V")                           \
   template(appendToClassPathForInstrumentation_name,   "appendToClassPathForInstrumentation")                     \
   do_alias(appendToClassPathForInstrumentation_signature, string_void_signature)                                  \
   template(serializePropertiesToByteArray_name,        "serializePropertiesToByteArray")                          \
--- a/src/share/vm/prims/jvmti.xml	Fri Mar 24 16:56:51 2017 +0000
+++ b/src/share/vm/prims/jvmti.xml	Tue Mar 28 13:28:24 2017 +0100
@@ -6516,7 +6516,7 @@
     <function id="GetNamedModule" num="40" since="9">
       <synopsis>Get Named Module</synopsis>
       <description>
-        Return the <code>java.lang.reflect.Module</code> object for a named
+        Return the <code>java.lang.Module</code> object for a named
         module defined to a class loader that contains a given package.
         The module is returned via <code>module_ptr</code>.
         <p/>
@@ -6554,7 +6554,7 @@
         <param id="module_ptr">
           <outptr><jobject/></outptr>
           <description>
-            On return, points to a <code>java.lang.reflect.Module</code> object
+            On return, points to a <code>java.lang.Module</code> object
             or points to <code>NULL</code>.
           </description>
         </param>
@@ -6633,7 +6633,7 @@
           <description>
             The module the package is exported to.
             If the <code>to_module</code> is not a subclass of
-            <code>java.lang.reflect.Module</code> this function returns
+            <code>java.lang.Module</code> this function returns
             <errorlink id="JVMTI_ERROR_INVALID_MODULE"></errorlink>.
           </description>
         </param>
@@ -6684,7 +6684,7 @@
           <description>
             The module with the package to open.
             If the <code>to_module</code> is not a subclass of
-            <code>java.lang.reflect.Module</code> this function returns
+            <code>java.lang.Module</code> this function returns
             <errorlink id="JVMTI_ERROR_INVALID_MODULE"></errorlink>.
           </description>
         </param>
--- a/test/compiler/jvmci/common/CTVMUtilities.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/compiler/jvmci/common/CTVMUtilities.java	Tue Mar 28 13:28:24 2017 +0100
@@ -41,7 +41,6 @@
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
-import java.lang.reflect.Module;
 import java.lang.reflect.Parameter;
 import java.util.HashMap;
 import java.util.Map;
--- a/test/runtime/classFileParserBug/fakeMethodAccessor.jasm	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/classFileParserBug/fakeMethodAccessor.jasm	Tue Mar 28 13:28:24 2017 +0100
@@ -26,7 +26,6 @@
  // to create a sub-type of jdk.internal.reflect.MethodAccessorImpl in order
  // to bypass Reflection.getCallerClass.  That should fail with an IAE.
  //
- import java.lang.reflect.Module;
  class fakeMethodAccessor extends jdk.internal.reflect.MethodAccessorImpl {
      public static void main(String[] a) throws Exception {
         fakeMethodAccessor f = new fakeMethodAccessor();
@@ -60,11 +59,11 @@
         astore_1;
         getstatic    Field java/lang/System.out:"Ljava/io/PrintStream;";
         ldc    class java/lang/String;
-        invokevirtual    Method java/lang/Class.getModule:"()Ljava/lang/reflect/Module;";
+        invokevirtual    Method java/lang/Class.getModule:"()Ljava/lang/Module;";
         ldc    String "jdk.internal.misc";
         ldc    class FakeMethodAccessor;
-        invokevirtual    Method java/lang/Class.getModule:"()Ljava/lang/reflect/Module;";
-        invokevirtual    Method java/lang/reflect/Module.isExported:"(Ljava/lang/String;Ljava/lang/reflect/Module;)Z";
+        invokevirtual    Method java/lang/Class.getModule:"()Ljava/lang/Module;";
+        invokevirtual    Method java/lang/Module.isExported:"(Ljava/lang/String;Ljava/lang/Module;)Z";
         invokevirtual    Method java/io/PrintStream.println:"(Z)V";
         return;
 }
--- a/test/runtime/getSysPackage/GetSysPkgTest.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/getSysPackage/GetSysPkgTest.java	Tue Mar 28 13:28:24 2017 +0100
@@ -55,7 +55,7 @@
                 return m;
             }
         }
-        throw new RuntimeException("Failed to find method " + name + " in java.lang.reflect.Module");
+        throw new RuntimeException("Failed to find method " + name + " in java.lang.Module");
     }
 
     // Throw RuntimeException if getSystemPackageLocation() does not return
--- a/test/runtime/modules/AccModuleTest.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccModuleTest.java	Tue Mar 28 13:28:24 2017 +0100
@@ -28,8 +28,6 @@
  * @run main AccModuleTest
  */
 
-import java.io.File;
-
 public class AccModuleTest {
 
     public static void main(String args[]) throws Throwable {
--- a/test/runtime/modules/AccessCheck/AccessExportTwice.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/AccessExportTwice.java	Tue Mar 28 13:28:24 2017 +0100
@@ -39,8 +39,6 @@
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
-import java.lang.reflect.Layer;
-import java.lang.reflect.Module;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
@@ -58,7 +56,7 @@
 
 public class AccessExportTwice {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publicly defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -87,7 +85,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_first_mod, descriptor_second_mod);
 
         // Resolves "first_mod"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("first_mod"));
 
@@ -96,8 +94,8 @@
         map.put("first_mod", MySameClassLoader.loader1);
         map.put("second_mod", MySameClassLoader.loader1);
 
-        // Create Layer that contains first_mod & second_mod
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains first_mod & second_mod
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("first_mod") == MySameClassLoader.loader1);
         assertTrue(layer.findLoader("second_mod") == MySameClassLoader.loader1);
--- a/test/runtime/modules/AccessCheck/AccessReadTwice.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/AccessReadTwice.java	Tue Mar 28 13:28:24 2017 +0100
@@ -39,8 +39,6 @@
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
-import java.lang.reflect.Layer;
-import java.lang.reflect.Module;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
@@ -56,7 +54,7 @@
 
 public class AccessReadTwice {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publicly defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -85,7 +83,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_first_mod, descriptor_second_mod);
 
         // Resolves "first_mod" and "second_mod"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("first_mod", "second_mod"));
 
@@ -95,8 +93,8 @@
         map.put("first_mod", loader);
         map.put("second_mod", loader);
 
-        // Create Layer that contains first_mod & second_mod
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains first_mod & second_mod
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("first_mod") == loader);
         assertTrue(layer.findLoader("second_mod") == loader);
--- a/test/runtime/modules/AccessCheck/CheckRead.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/CheckRead.java	Tue Mar 28 13:28:24 2017 +0100
@@ -37,7 +37,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -59,7 +58,7 @@
 //
 public class CheckRead {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publicly defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -100,7 +99,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -110,8 +109,8 @@
         map.put("m2x", MySameClassLoader.loader1);
         map.put("m3x", MySameClassLoader.loader1);
 
-        // Create Layer that contains m1x, m2x and m3x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x, m2x and m3x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1);
--- a/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java	Tue Mar 28 13:28:24 2017 +0100
@@ -37,7 +37,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -59,7 +58,7 @@
 //
 public class DiffCL_CheckRead {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publicly defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -100,7 +99,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -110,8 +109,8 @@
         map.put("m2x", MyDiffClassLoader.loader2);
         map.put("m3x", MyDiffClassLoader.loader2);
 
-        // Create Layer that contains m1x, m2x and m3x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x, m2x and m3x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2);
--- a/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java	Tue Mar 28 13:28:24 2017 +0100
@@ -38,7 +38,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -60,7 +59,7 @@
 //
 public class DiffCL_ExpQualOther {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -102,7 +101,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -112,8 +111,8 @@
         map.put("m2x", MyDiffClassLoader.loader2);
         map.put("m3x", MyDiffClassLoader.loader2);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2);
--- a/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java	Tue Mar 28 13:28:24 2017 +0100
@@ -37,7 +37,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -58,7 +57,7 @@
 //
 public class DiffCL_ExpQualToM1 {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -88,7 +87,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -97,8 +96,8 @@
         map.put("m1x", MyDiffClassLoader.loader1);
         map.put("m2x", MyDiffClassLoader.loader2);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2);
--- a/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java	Tue Mar 28 13:28:24 2017 +0100
@@ -37,7 +37,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -59,7 +58,7 @@
 //
 public class DiffCL_ExpUnqual {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -89,7 +88,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -98,8 +97,8 @@
         map.put("m1x", MyDiffClassLoader.loader1);
         map.put("m2x", MyDiffClassLoader.loader2);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2);
--- a/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java	Tue Mar 28 13:28:24 2017 +0100
@@ -37,7 +37,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -58,7 +57,7 @@
 //
 public class DiffCL_PkgNotExp {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -88,7 +87,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -97,8 +96,8 @@
         map.put("m1x", MyDiffClassLoader.loader1);
         map.put("m2x", MyDiffClassLoader.loader2);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2);
--- a/test/runtime/modules/AccessCheck/DiffCL_Umod.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/DiffCL_Umod.java	Tue Mar 28 13:28:24 2017 +0100
@@ -42,8 +42,6 @@
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
-import java.lang.reflect.Layer;
-import java.lang.reflect.Module;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
@@ -68,7 +66,7 @@
 //
 public class DiffCL_Umod {
 
- // Create Layers over the boot layer to test different
+ // Create layers over the boot layer to test different
  // accessing scenarios of a named module to an unnamed module.
 
  // Module m1x is a strict module and has not established
@@ -89,7 +87,7 @@
      ModuleFinder finder = ModuleLibrary.of(descriptor_m1x);
 
      // Resolves "m1x"
-     Configuration cf = Layer.boot()
+     Configuration cf = ModuleLayer.boot()
              .configuration()
              .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -102,8 +100,8 @@
      Map<String, ClassLoader> map = new HashMap<>();
      map.put("m1x", MyDiffClassLoader.loader1);
 
-     // Create Layer that contains m1x
-     Layer layer = Layer.boot().defineModules(cf, map::get);
+     // Create layer that contains m1x
+     ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
      assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1);
      assertTrue(layer.findLoader("java.base") == null);
@@ -138,7 +136,7 @@
      ModuleFinder finder = ModuleLibrary.of(descriptor_m1x);
 
      // Resolves "m1x"
-     Configuration cf = Layer.boot()
+     Configuration cf = ModuleLayer.boot()
              .configuration()
              .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -151,8 +149,8 @@
      Map<String, ClassLoader> map = new HashMap<>();
      map.put("m1x", MyDiffClassLoader.loader1);
 
-     // Create Layer that contains m1x
-     Layer layer = Layer.boot().defineModules(cf, map::get);
+     // Create layer that contains m1x
+     ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
      assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1);
      assertTrue(layer.findLoader("java.base") == null);
@@ -187,7 +185,7 @@
      ModuleFinder finder = ModuleLibrary.of(descriptor_m1x);
 
      // Resolves "m1x"
-     Configuration cf = Layer.boot()
+     Configuration cf = ModuleLayer.boot()
              .configuration()
              .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -200,8 +198,8 @@
      Map<String, ClassLoader> map = new HashMap<>();
      map.put("m1x", MyDiffClassLoader.loader1);
 
-     // Create Layer that contains m1x
-     Layer layer = Layer.boot().defineModules(cf, map::get);
+     // Create layer that contains m1x
+     ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
      assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1);
      assertTrue(layer.findLoader("java.base") == null);
--- a/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java	Tue Mar 28 13:28:24 2017 +0100
@@ -38,7 +38,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -63,7 +62,7 @@
 //
 public class DiffCL_UmodUpkg {
 
- // Create Layers over the boot layer to test different
+ // Create layers over the boot layer to test different
  // accessing scenarios of a named module to an unnamed module.
 
  // Module m1x is a strict module and has not established
@@ -84,7 +83,7 @@
      ModuleFinder finder = ModuleLibrary.of(descriptor_m1x);
 
      // Resolves "m1x"
-     Configuration cf = Layer.boot()
+     Configuration cf = ModuleLayer.boot()
              .configuration()
              .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -97,8 +96,8 @@
      Map<String, ClassLoader> map = new HashMap<>();
      map.put("m1x", MyDiffClassLoader.loader1);
 
-     // Create Layer that contains m1x
-     Layer layer = Layer.boot().defineModules(cf, map::get);
+     // Create layer that contains m1x
+     ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
      assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1);
      assertTrue(layer.findLoader("java.base") == null);
@@ -133,7 +132,7 @@
      ModuleFinder finder = ModuleLibrary.of(descriptor_m1x);
 
      // Resolves "m1x"
-     Configuration cf = Layer.boot()
+     Configuration cf = ModuleLayer.boot()
              .configuration()
              .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -146,8 +145,8 @@
      Map<String, ClassLoader> map = new HashMap<>();
      map.put("m1x", MyDiffClassLoader.loader1);
 
-     // Create Layer that contains m1x
-     Layer layer = Layer.boot().defineModules(cf, map::get);
+     // Create layer that contains m1x
+     ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
      assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1);
      assertTrue(layer.findLoader("java.base") == null);
--- a/test/runtime/modules/AccessCheck/ExpQualOther.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/ExpQualOther.java	Tue Mar 28 13:28:24 2017 +0100
@@ -38,7 +38,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -60,7 +59,7 @@
 //
 public class ExpQualOther {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -102,7 +101,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -112,8 +111,8 @@
         map.put("m2x", MySameClassLoader.loader1);
         map.put("m3x", MySameClassLoader.loader1);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1);
--- a/test/runtime/modules/AccessCheck/ExpQualToM1.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/ExpQualToM1.java	Tue Mar 28 13:28:24 2017 +0100
@@ -37,7 +37,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -48,7 +47,7 @@
 
 public class ExpQualToM1 {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -78,7 +77,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -87,8 +86,8 @@
         map.put("m1x", MySameClassLoader.loader1);
         map.put("m2x", MySameClassLoader.loader1);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1);
--- a/test/runtime/modules/AccessCheck/ExpUnqual.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/ExpUnqual.java	Tue Mar 28 13:28:24 2017 +0100
@@ -37,7 +37,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -48,7 +47,7 @@
 
 public class ExpUnqual {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -78,7 +77,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -87,8 +86,8 @@
         map.put("m1x", MySameClassLoader.loader1);
         map.put("m2x", MySameClassLoader.loader1);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1);
--- a/test/runtime/modules/AccessCheck/ExportAllUnnamed.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/ExportAllUnnamed.java	Tue Mar 28 13:28:24 2017 +0100
@@ -41,8 +41,6 @@
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
-import java.lang.reflect.Layer;
-import java.lang.reflect.Module;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
@@ -61,7 +59,7 @@
 
 public class ExportAllUnnamed {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -90,7 +88,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -99,8 +97,8 @@
         map.put("m1x", MySameClassLoader.loader1);
         map.put("m2x", MySameClassLoader.loader1);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1);
--- a/test/runtime/modules/AccessCheck/PkgNotExp.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/PkgNotExp.java	Tue Mar 28 13:28:24 2017 +0100
@@ -37,7 +37,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -58,7 +57,7 @@
 //
 public class PkgNotExp {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -88,7 +87,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -97,8 +96,8 @@
         map.put("m1x", MySameClassLoader.loader1);
         map.put("m2x", MySameClassLoader.loader1);
 
-        // Create Layer that contains m1x and m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x and m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1);
--- a/test/runtime/modules/AccessCheck/Umod.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/Umod.java	Tue Mar 28 13:28:24 2017 +0100
@@ -39,11 +39,9 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
-import java.lang.reflect.Module;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
@@ -68,7 +66,7 @@
 //
 public class Umod {
 
- // Create Layers over the boot layer to test different
+ // Create layers over the boot layer to test different
  // accessing scenarios of a named module to an unnamed module.
 
  // Module m1x is a strict module and has not established
@@ -89,7 +87,7 @@
      ModuleFinder finder = ModuleLibrary.of(descriptor_m1x);
 
      // Resolves "m1x"
-     Configuration cf = Layer.boot()
+     Configuration cf = ModuleLayer.boot()
              .configuration()
              .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -99,8 +97,8 @@
      Map<String, ClassLoader> map = new HashMap<>();
      map.put("m1x", loader);
 
-     // Create Layer that contains m1x
-     Layer layer = Layer.boot().defineModules(cf, map::get);
+     // Create layer that contains m1x
+     ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
      assertTrue(layer.findLoader("m1x") == loader);
      assertTrue(layer.findLoader("java.base") == null);
@@ -135,7 +133,7 @@
      ModuleFinder finder = ModuleLibrary.of(descriptor_m1x);
 
      // Resolves "m1x"
-     Configuration cf = Layer.boot()
+     Configuration cf = ModuleLayer.boot()
              .configuration()
              .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -145,8 +143,8 @@
      Map<String, ClassLoader> map = new HashMap<>();
      map.put("m1x", loader);
 
-     // Create Layer that contains m1x
-     Layer layer = Layer.boot().defineModules(cf, map::get);
+     // Create layer that contains m1x
+     ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
      assertTrue(layer.findLoader("m1x") == loader);
      assertTrue(layer.findLoader("java.base") == null);
@@ -181,7 +179,7 @@
      ModuleFinder finder = ModuleLibrary.of(descriptor_m1x);
 
      // Resolves "m1x"
-     Configuration cf = Layer.boot()
+     Configuration cf = ModuleLayer.boot()
              .configuration()
              .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -191,8 +189,8 @@
      Map<String, ClassLoader> map = new HashMap<>();
      map.put("m1x", loader);
 
-     // Create Layer that contains m1x
-     Layer layer = Layer.boot().defineModules(cf, map::get);
+     // Create layer that contains m1x
+     ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
      assertTrue(layer.findLoader("m1x") == loader);
      assertTrue(layer.findLoader("java.base") == null);
--- a/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java	Tue Mar 28 13:28:24 2017 +0100
@@ -38,7 +38,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -60,7 +59,7 @@
 //
 public class UmodDiffCL_ExpQualOther {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -89,7 +88,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -98,8 +97,8 @@
         map.put("m1x", MyDiffClassLoader.loader1);
         map.put("m2x", MyDiffClassLoader.loader2);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2);
--- a/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java	Tue Mar 28 13:28:24 2017 +0100
@@ -38,7 +38,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -60,7 +59,7 @@
 //
 public class UmodDiffCL_ExpUnqual {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -89,7 +88,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -98,8 +97,8 @@
         map.put("m1x", MyDiffClassLoader.loader1);
         map.put("m2x", MyDiffClassLoader.loader2);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2);
--- a/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java	Tue Mar 28 13:28:24 2017 +0100
@@ -37,7 +37,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -59,7 +58,7 @@
 //
 public class UmodDiffCL_PkgNotExp {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -88,7 +87,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -97,8 +96,8 @@
         map.put("m1x", MyDiffClassLoader.loader1);
         map.put("m2x", MyDiffClassLoader.loader2);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2);
--- a/test/runtime/modules/AccessCheck/UmodUPkg.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/UmodUPkg.java	Tue Mar 28 13:28:24 2017 +0100
@@ -40,8 +40,6 @@
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
-import java.lang.reflect.Layer;
-import java.lang.reflect.Module;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
@@ -63,7 +61,7 @@
 //
 public class UmodUPkg {
 
- // Create Layers over the boot layer to test different
+ // Create layers over the boot layer to test different
  // accessing scenarios of a named module to an unnamed module.
 
  // Module m1x is a strict module and has not established
@@ -84,7 +82,7 @@
      ModuleFinder finder = ModuleLibrary.of(descriptor_m1x);
 
      // Resolves "m1x"
-     Configuration cf = Layer.boot()
+     Configuration cf = ModuleLayer.boot()
              .configuration()
              .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -94,8 +92,8 @@
      Map<String, ClassLoader> map = new HashMap<>();
      map.put("m1x", loader);
 
-     // Create Layer that contains m1x
-     Layer layer = Layer.boot().defineModules(cf, map::get);
+     // Create layer that contains m1x
+     ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
      assertTrue(layer.findLoader("m1x") == loader);
      assertTrue(layer.findLoader("java.base") == null);
@@ -130,7 +128,7 @@
      ModuleFinder finder = ModuleLibrary.of(descriptor_m1x);
 
      // Resolves "m1x"
-     Configuration cf = Layer.boot()
+     Configuration cf = ModuleLayer.boot()
              .configuration()
              .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -140,8 +138,8 @@
      Map<String, ClassLoader> map = new HashMap<>();
      map.put("m1x", loader);
 
-     // Create Layer that contains m1x
-     Layer layer = Layer.boot().defineModules(cf, map::get);
+     // Create layer that contains m1x
+     ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
      assertTrue(layer.findLoader("m1x") == loader);
      assertTrue(layer.findLoader("java.base") == null);
--- a/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java	Tue Mar 28 13:28:24 2017 +0100
@@ -38,7 +38,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -60,7 +59,7 @@
 //
 public class UmodUpkgDiffCL_ExpQualOther {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -89,7 +88,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -98,8 +97,8 @@
         map.put("m1x", MyDiffClassLoader.loader1);
         map.put("m2x", MyDiffClassLoader.loader2);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2);
--- a/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java	Tue Mar 28 13:28:24 2017 +0100
@@ -37,7 +37,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -59,7 +58,7 @@
 //
 public class UmodUpkgDiffCL_NotExp {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -88,7 +87,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -97,8 +96,8 @@
         map.put("m1x", MyDiffClassLoader.loader1);
         map.put("m2x", MyDiffClassLoader.loader2);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MyDiffClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MyDiffClassLoader.loader2);
--- a/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java	Tue Mar 28 13:28:24 2017 +0100
@@ -37,7 +37,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -59,12 +58,12 @@
 //
 public class UmodUpkg_ExpQualOther {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
 
-        // Define module:     m1x (need to define m1x to establish the Layer successfully)
+        // Define module:     m1x (need to define m1x to establish the layer successfully)
         // Can read:          java.base, m2x, m3x
         // Packages:          none
         // Packages exported: none
@@ -98,7 +97,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -108,8 +107,8 @@
         map.put("m2x", MySameClassLoader.loader1);
         map.put("m3x", MySameClassLoader.loader1);
 
-        // Create Layer that contains m1x, m2x and m3x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x, m2x and m3x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1);
--- a/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java	Tue Mar 28 13:28:24 2017 +0100
@@ -37,7 +37,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -57,7 +56,7 @@
 //
 public class UmodUpkg_NotExp {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -86,7 +85,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -95,8 +94,8 @@
         map.put("m1x", MySameClassLoader.loader1);
         map.put("m2x", MySameClassLoader.loader1);
 
-        // Create Layer that contains m1x and m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x and m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1);
--- a/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java	Tue Mar 28 13:28:24 2017 +0100
@@ -37,7 +37,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -59,12 +58,12 @@
 //
 public class Umod_ExpQualOther {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
 
-        // Define module:     m1x (need to define m1x to establish the Layer successfully)
+        // Define module:     m1x (need to define m1x to establish the layer successfully)
         // Can read:          java.base, m2x, m3x
         // Packages:          none
         // Packages exported: none
@@ -98,7 +97,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -108,8 +107,8 @@
         map.put("m2x", MySameClassLoader.loader1);
         map.put("m3x", MySameClassLoader.loader1);
 
-        // Create Layer that contains m1x, m2x and m3x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x, m2x and m3x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1);
--- a/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java	Tue Mar 28 13:28:24 2017 +0100
@@ -37,7 +37,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -59,7 +58,7 @@
 
 public class Umod_ExpUnqual {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -88,7 +87,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -97,8 +96,8 @@
         map.put("m1x", MySameClassLoader.loader1);
         map.put("m2x", MySameClassLoader.loader1);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1);
--- a/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java	Tue Mar 28 13:28:24 2017 +0100
@@ -37,7 +37,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -57,7 +56,7 @@
 //
 public class Umod_PkgNotExp {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -86,7 +85,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -95,8 +94,8 @@
         map.put("m1x", MySameClassLoader.loader1);
         map.put("m2x", MySameClassLoader.loader1);
 
-        // Create Layer that contains m1x and m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x and m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
 
         assertTrue(layer.findLoader("m1x") == MySameClassLoader.loader1);
         assertTrue(layer.findLoader("m2x") == MySameClassLoader.loader1);
--- a/test/runtime/modules/AccessCheck/p1/c1ReadEdge.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/p1/c1ReadEdge.java	Tue Mar 28 13:28:24 2017 +0100
@@ -22,7 +22,6 @@
  */
 package p1;
 
-import java.lang.reflect.*;
 import p2.c2;
 
 public class c1ReadEdge {
--- a/test/runtime/modules/AccessCheck/p1/c1ReadEdgeDiffLoader.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/p1/c1ReadEdgeDiffLoader.java	Tue Mar 28 13:28:24 2017 +0100
@@ -22,7 +22,6 @@
  */
 package p1;
 
-import java.lang.reflect.*;
 import myloaders.MyDiffClassLoader;
 import p2.c2;
 
--- a/test/runtime/modules/AccessCheck/p3/c3ReadEdge.jcod	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/p3/c3ReadEdge.jcod	Tue Mar 28 13:28:24 2017 +0100
@@ -23,7 +23,6 @@
 
 /*
  * package p3;
- * import java.lang.reflect.*;
  * public class c3ReadEdge {
  *    public c3ReadEdge() {
  *       // Establish read edge from module m1x, where c3ReadEdge is defined,
@@ -75,14 +74,14 @@
     Utf8 "java/lang/Object"; // #28     at 0xBC
     Utf8 "java/lang/Class"; // #29     at 0xCF
     Utf8 "getModule"; // #30     at 0xE1
-    Utf8 "()Ljava/lang/reflect/Module;"; // #31     at 0xED
+    Utf8 "()Ljava/lang/Module;"; // #31     at 0xED
     Utf8 "getClassLoader"; // #32     at 0x010C
     Utf8 "()Ljava/lang/ClassLoader;"; // #33     at 0x011D
     Utf8 "java/lang/ClassLoader"; // #34     at 0x0139
     Utf8 "getUnnamedModule"; // #35     at 0x0151
-    Utf8 "java/lang/reflect/Module"; // #36     at 0x0164
+    Utf8 "java/lang/Module"; // #36     at 0x0164
     Utf8 "addReads"; // #37     at 0x017F
-    Utf8 "(Ljava/lang/reflect/Module;)Ljava/lang/reflect/Module;"; // #38     at 0x018A
+    Utf8 "(Ljava/lang/Module;)Ljava/lang/Module;"; // #38     at 0x018A
     Utf8 "method4"; // #39     at 0x01C3
   } // Constant Pool
 
--- a/test/runtime/modules/AccessCheck/p3/c3ReadEdgeDiffLoader.jcod	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/p3/c3ReadEdgeDiffLoader.jcod	Tue Mar 28 13:28:24 2017 +0100
@@ -23,7 +23,6 @@
 
 /* 
  * package p3;
- * import java.lang.reflect.*;
  * import myloaders.MyDiffClassLoader;
  *
  * public class c3ReadEdgeDiffLoader {
@@ -100,14 +99,14 @@
     Utf8 "java/lang/Object"; // #31     at 0xDD
     Utf8 "java/lang/Class"; // #32     at 0xF0
     Utf8 "getModule"; // #33     at 0x0102
-    Utf8 "()Ljava/lang/reflect/Module;"; // #34     at 0x010E
+    Utf8 "()Ljava/lang/Module;"; // #34     at 0x010E
     Utf8 "java/lang/ClassLoader"; // #35     at 0x012D
     Utf8 "getSystemClassLoader"; // #36     at 0x0145
     Utf8 "()Ljava/lang/ClassLoader;"; // #37     at 0x015C
     Utf8 "getUnnamedModule"; // #38     at 0x0178
-    Utf8 "java/lang/reflect/Module"; // #39     at 0x018B
+    Utf8 "java/lang/Module"; // #39     at 0x018B
     Utf8 "addReads"; // #40     at 0x01A6
-    Utf8 "(Ljava/lang/reflect/Module;)Ljava/lang/reflect/Module;"; // #41     at 0x01B1
+    Utf8 "(Ljava/lang/Module;)Ljava/lang/Module;"; // #41     at 0x01B1
     Utf8 "myloaders/MyDiffClassLoader"; // #42     at 0x01EA
     Utf8 "loader2"; // #43     at 0x0208
     Utf8 "Lmyloaders/MyDiffClassLoader;"; // #44     at 0x0212
--- a/test/runtime/modules/AccessCheck/p4/c4.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheck/p4/c4.java	Tue Mar 28 13:28:24 2017 +0100
@@ -25,8 +25,6 @@
 
 package p4;
 
-import java.lang.reflect.Module;
-
 public class c4 {
     // Add a read edge from c4's module to given module m
     public void addReads(Module m) {
--- a/test/runtime/modules/AccessCheckAllUnnamed.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheckAllUnnamed.java	Tue Mar 28 13:28:24 2017 +0100
@@ -21,7 +21,6 @@
  * questions.
  */
 
-import java.lang.reflect.Module;
 import static jdk.test.lib.Asserts.*;
 
 /*
@@ -31,7 +30,7 @@
  * @compile p2/c2.java
  * @compile p1/c1.java
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AccessCheckAllUnnamed
@@ -45,10 +44,10 @@
     public static void main(String args[]) throws Throwable {
         Object m1x, m2x;
 
-        // Get the java.lang.reflect.Module object for module java.base.
+        // Get the java.lang.Module object for module java.base.
         Class jlObject = Class.forName("java.lang.Object");
-        Object jlObject_jlrM = jlObject.getModule();
-        assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null");
+        Object jlM = jlObject.getModule();
+        assertNotNull(jlM, "jlModule object of java.lang.Object should not be null");
 
         // Get the class loader for AccessCheckWorks and assume it's also used to
         // load class p2.c2.
@@ -58,13 +57,13 @@
         m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p3" });
         assertNotNull(m1x, "Module should not be null");
         ModuleHelper.DefineModule(m1x, "9.0", "m1x/there", new String[] { "p3" });
-        ModuleHelper.AddReadsModule(m1x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m1x, jlM);
 
         // Define a module for p2.
         m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" });
         assertNotNull(m2x, "Module should not be null");
         ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" });
-        ModuleHelper.AddReadsModule(m2x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m2x, jlM);
 
         try {
             ModuleHelper.AddModuleExportsToAllUnnamed((Module)null, "p2");
--- a/test/runtime/modules/AccessCheckExp.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheckExp.java	Tue Mar 28 13:28:24 2017 +0100
@@ -28,13 +28,12 @@
  * @compile p2/c2.java
  * @compile p1/c1.java
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AccessCheckExp
  */
 
-import java.lang.reflect.Module;
 import static jdk.test.lib.Asserts.*;
 
 public class AccessCheckExp {
@@ -44,10 +43,10 @@
     public static void main(String args[]) throws Throwable {
         Object m1x, m2x;
 
-        // Get the java.lang.reflect.Module object for module java.base.
+        // Get the java.lang.Module object for module java.base.
         Class jlObject = Class.forName("java.lang.Object");
-        Object jlObject_jlrM = jlObject.getModule();
-        assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null");
+        Object jlObject_jlM = jlObject.getModule();
+        assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null");
 
         // Get the class loader for AccessCheckExp and assume it's also used to
         // load classes p1.c1 and p2.c2.
@@ -57,13 +56,13 @@
         m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p1" });
         assertNotNull(m1x, "Module should not be null");
         ModuleHelper.DefineModule(m1x, "9.0", "m1x/here", new String[] { "p1" });
-        ModuleHelper.AddReadsModule(m1x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m1x, jlObject_jlM);
 
         // Define a module for p2.
         m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" });
         assertNotNull(m2x, "Module should not be null");
         ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" });
-        ModuleHelper.AddReadsModule(m2x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m2x, jlObject_jlM);
 
         // Make package p1 in m1x visible to everyone.
         ModuleHelper.AddModuleExportsToAll(m1x, "p1");
--- a/test/runtime/modules/AccessCheckJavaBase.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheckJavaBase.java	Tue Mar 28 13:28:24 2017 +0100
@@ -27,13 +27,12 @@
  * @library /test/lib ..
  * @compile p2/c2.java
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AccessCheckJavaBase
  */
 
-import java.lang.reflect.Module;
 import static jdk.test.lib.Asserts.*;
 
 public class AccessCheckJavaBase {
--- a/test/runtime/modules/AccessCheckRead.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheckRead.java	Tue Mar 28 13:28:24 2017 +0100
@@ -28,13 +28,12 @@
  * @compile p2/c2.java
  * @compile p1/c1.java
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AccessCheckRead
  */
 
-import java.lang.reflect.Module;
 import static jdk.test.lib.Asserts.*;
 
 public class AccessCheckRead {
@@ -44,10 +43,10 @@
     public static void main(String args[]) throws Throwable {
         Object m1x, m2x;
 
-        // Get the java.lang.reflect.Module object for module java.base.
+        // Get the java.lang.Module object for module java.base.
         Class jlObject = Class.forName("java.lang.Object");
-        Object jlObject_jlrM = jlObject.getModule();
-        assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null");
+        Object jlObject_jlM = jlObject.getModule();
+        assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null");
 
         // Get the class loader for AccessCheckRead and assume it's also used to
         // load classes p1.c1 and p2.c2.
@@ -57,13 +56,13 @@
         m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p1" });
         assertNotNull(m1x, "Module should not be null");
         ModuleHelper.DefineModule(m1x, "9.0", "m1x/here", new String[] { "p1" });
-        ModuleHelper.AddReadsModule(m1x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m1x, jlObject_jlM);
 
         // Define a module for p2.
         m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" });
         assertNotNull(m2x, "Module should not be null");
         ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" });
-        ModuleHelper.AddReadsModule(m2x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m2x, jlObject_jlM);
 
         // Make package p1 in m1x visible to everyone.
         ModuleHelper.AddModuleExportsToAll(m1x, "p1");
--- a/test/runtime/modules/AccessCheckSuper.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheckSuper.java	Tue Mar 28 13:28:24 2017 +0100
@@ -28,13 +28,12 @@
  * @compile p2/c2.java
  * @compile p3/c3.java
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AccessCheckSuper
  */
 
-import java.lang.reflect.Module;
 import static jdk.test.lib.Asserts.*;
 
 public class AccessCheckSuper {
--- a/test/runtime/modules/AccessCheckUnnamed.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheckUnnamed.java	Tue Mar 28 13:28:24 2017 +0100
@@ -21,7 +21,6 @@
  * questions.
  */
 
-import java.lang.reflect.Module;
 import static jdk.test.lib.Asserts.*;
 
 /*
@@ -31,7 +30,7 @@
  * @compile p2/c2.java
  * @compile p1/c1.java
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AccessCheckUnnamed
@@ -44,10 +43,10 @@
     public static void main(String args[]) throws Throwable {
         Object m1x, m2x;
 
-        // Get the java.lang.reflect.Module object for module java.base.
+        // Get the java.lang.Module object for module java.base.
         Class jlObject = Class.forName("java.lang.Object");
-        Object jlObject_jlrM = jlObject.getModule();
-        assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null");
+        Object jlObject_jlM = jlObject.getModule();
+        assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null");
 
         // Get the class loader for AccessCheckWorks and assume it's also used to
         // load class p2.c2.
@@ -57,7 +56,7 @@
         m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" });
         assertNotNull(m2x, "Module should not be null");
         ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" });
-        ModuleHelper.AddReadsModule(m2x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m2x, jlObject_jlM);
 
         // p1.c1's ctor tries to call a method in p2.c2.  This should fail because
         // p1 is in the unnamed module and p2.c2 is not unqualifiedly exported.
--- a/test/runtime/modules/AccessCheckWorks.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/AccessCheckWorks.java	Tue Mar 28 13:28:24 2017 +0100
@@ -28,13 +28,12 @@
  * @compile p2/c2.java
  * @compile p1/c1.java
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AccessCheckWorks
  */
 
-import java.lang.reflect.Module;
 import static jdk.test.lib.Asserts.*;
 
 public class AccessCheckWorks {
@@ -45,10 +44,10 @@
     public static void main(String args[]) throws Throwable {
         Object m1x, m2x;
 
-        // Get the java.lang.reflect.Module object for module java.base.
+        // Get the java.lang.Module object for module java.base.
         Class jlObject = Class.forName("java.lang.Object");
-        Object jlObject_jlrM = jlObject.getModule();
-        assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null");
+        Object jlObject_jlM = jlObject.getModule();
+        assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null");
 
         // Get the class loader for AccessCheckWorks and assume it's also used to
         // load classes p1.c1 and p2.c2.
@@ -58,13 +57,13 @@
         m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p1" });
         assertNotNull(m1x, "Module should not be null");
         ModuleHelper.DefineModule(m1x, "9.0", "m1x/here", new String[] { "p1" });
-        ModuleHelper.AddReadsModule(m1x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m1x, jlObject_jlM);
 
         // Define a module for p2.
         m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" });
         assertNotNull(m2x, "Module should not be null");
         ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" });
-        ModuleHelper.AddReadsModule(m2x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m2x, jlObject_jlM);
 
         // Make package p1 in m1x visible to everyone.
         ModuleHelper.AddModuleExportsToAll(m1x, "p1");
--- a/test/runtime/modules/CCE_module_msg.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/CCE_module_msg.java	Tue Mar 28 13:28:24 2017 +0100
@@ -28,14 +28,13 @@
  * @compile p2/c2.java
  * @compile p4/c4.java
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI CCE_module_msg
  */
 
 import java.io.*;
-import java.lang.reflect.Module;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.nio.file.Path;
@@ -73,10 +72,10 @@
     }
 
     public static void invalidClassToString() throws Throwable {
-        // Get the java.lang.reflect.Module object for module java.base.
+        // Get the java.lang.Module object for module java.base.
         Class jlObject = Class.forName("java.lang.Object");
-        Object jlObject_jlrM = jlObject.getModule();
-        assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null");
+        Object jlObject_jlM = jlObject.getModule();
+        assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null");
 
         // Get the class loader for CCE_module_msg and assume it's also used to
         // load classes p1.c1 and p2.c2.
@@ -86,7 +85,7 @@
         Object m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" });
         assertNotNull(m2x, "Module should not be null");
         ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" });
-        ModuleHelper.AddReadsModule(m2x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m2x, jlObject_jlM);
 
         try {
             ModuleHelper.AddModuleExportsToAll(m2x, "p2");
@@ -105,10 +104,10 @@
     }
 
     public static void invalidClassToStringCustomLoader() throws Throwable {
-        // Get the java.lang.reflect.Module object for module java.base.
+        // Get the java.lang.Module object for module java.base.
         Class jlObject = Class.forName("java.lang.Object");
-        Object jlObject_jlrM = jlObject.getModule();
-        assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null");
+        Object jlObject_jlM = jlObject.getModule();
+        assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null");
 
         // Create a customer class loader to load class p4/c4.
         URL[] urls = new URL[] { CLASSES_DIR.toUri().toURL() };
--- a/test/runtime/modules/ExportTwice.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/ExportTwice.java	Tue Mar 28 13:28:24 2017 +0100
@@ -28,13 +28,12 @@
  * @compile p2/c2.java
  * @compile p1/c1.java
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI ExportTwice
  */
 
-import java.lang.reflect.Module;
 import static jdk.test.lib.Asserts.*;
 
 public class ExportTwice {
@@ -46,10 +45,10 @@
     public static void main(String args[]) throws Throwable {
         Object m1x, m2x, m3x;
 
-        // Get the java.lang.reflect.Module object for module java.base.
+        // Get the java.lang.Module object for module java.base.
         Class jlObject = Class.forName("java.lang.Object");
-        Object jlObject_jlrM = jlObject.getModule();
-        assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null");
+        Object jlObject_jlM = jlObject.getModule();
+        assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null");
 
         // Get the class loader for ExportTwice and assume it's also used to
         // load classes p1.c1 and p2.c2.
@@ -59,19 +58,19 @@
         m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p1" });
         assertNotNull(m1x, "Module should not be null");
         ModuleHelper.DefineModule(m1x, "9.0", "m1x/here", new String[] { "p1" });
-        ModuleHelper.AddReadsModule(m1x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m1x, jlObject_jlM);
 
         // Define a module for p2.
         m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" });
         assertNotNull(m2x, "Module should not be null");
         ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" });
-        ModuleHelper.AddReadsModule(m2x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m2x, jlObject_jlM);
 
         // Define a module for p3.
         m3x = ModuleHelper.ModuleObject("module_three", this_cldr, new String[] { "p3" });
         assertNotNull(m3x, "Module should not be null");
         ModuleHelper.DefineModule(m3x, "9.0", "m3x/there", new String[] { "p3" });
-        ModuleHelper.AddReadsModule(m3x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m3x, jlObject_jlM);
 
         // Make package p1 in m1x visible to everyone.
         ModuleHelper.AddModuleExportsToAll(m1x, "p1");
--- a/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java	Tue Mar 28 13:28:24 2017 +0100
@@ -30,11 +30,10 @@
  * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI JVMAddModuleExportToAllUnnamed
  */
 
-import java.lang.reflect.Module;
 import static jdk.test.lib.Asserts.*;
 
 public class JVMAddModuleExportToAllUnnamed {
@@ -44,10 +43,10 @@
     public static void main(String args[]) throws Throwable {
         Object m1x;
 
-        // Get the java.lang.reflect.Module object for module java.base.
+        // Get the java.lang.Module object for module java.base.
         Class jlObject = Class.forName("java.lang.Object");
-        Object jlObject_jlrM = jlObject.getModule();
-        assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null");
+        Object jlObject_jlM = jlObject.getModule();
+        assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null");
 
         // Get the class loader for JVMAddModuleExportToAllUnnamed and assume it's also used to
         // load class p1.c1.
@@ -57,7 +56,7 @@
         m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p1" });
         assertNotNull(m1x, "Module should not be null");
         ModuleHelper.DefineModule(m1x, "9.0", "m1x/here", new String[] { "p1" });
-        ModuleHelper.AddReadsModule(m1x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m1x, jlObject_jlM);
 
         // Make package p1 in m1x visible to everyone.
         ModuleHelper.AddModuleExportsToAll(m1x, "p1");
--- a/test/runtime/modules/JVMAddModuleExports.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/JVMAddModuleExports.java	Tue Mar 28 13:28:24 2017 +0100
@@ -26,13 +26,12 @@
  * @modules java.base/jdk.internal.misc
  * @library /test/lib ..
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI JVMAddModuleExports
  */
 
-import java.lang.reflect.Module;
 import static jdk.test.lib.Asserts.*;
 
 public class JVMAddModuleExports {
--- a/test/runtime/modules/JVMAddModuleExportsToAll.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/JVMAddModuleExportsToAll.java	Tue Mar 28 13:28:24 2017 +0100
@@ -21,7 +21,6 @@
  * questions.
  */
 
-import java.lang.reflect.Module;
 import static jdk.test.lib.Asserts.*;
 
 /*
@@ -31,7 +30,7 @@
  * @compile p2/c2.java
  * @compile p1/c1.java
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI JVMAddModuleExportsToAll
@@ -45,10 +44,10 @@
     public static void main(String args[]) throws Throwable {
         Object m1x, m2x, m3x;
 
-        // Get the java.lang.reflect.Module object for module java.base.
+        // Get the java.lang.Module object for module java.base.
         Class jlObject = Class.forName("java.lang.Object");
-        Object jlObject_jlrM = jlObject.getModule();
-        assertNotNull(jlObject_jlrM, "jlrModule object of java.lang.Object should not be null");
+        Object jlObject_jlM = jlObject.getModule();
+        assertNotNull(jlObject_jlM, "jlModule object of java.lang.Object should not be null");
 
         // Get the class loader for JVMAddModuleExportsToAll and assume it's also used to
         // load class p2.c2.
@@ -58,13 +57,13 @@
         m1x = ModuleHelper.ModuleObject("module_one", this_cldr, new String[] { "p3" });
         assertNotNull(m1x, "Module should not be null");
         ModuleHelper.DefineModule(m1x, "9.0", "m1x/there", new String[] { "p3" });
-        ModuleHelper.AddReadsModule(m1x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m1x, jlObject_jlM);
 
         // Define a module for p2.
         m2x = ModuleHelper.ModuleObject("module_two", this_cldr, new String[] { "p2" });
         assertNotNull(m2x, "Module should not be null");
         ModuleHelper.DefineModule(m2x, "9.0", "m2x/there", new String[] { "p2" });
-        ModuleHelper.AddReadsModule(m2x, jlObject_jlrM);
+        ModuleHelper.AddReadsModule(m2x, jlObject_jlM);
 
         try {
             ModuleHelper.AddModuleExportsToAll((Module)null, "p2");
@@ -80,7 +79,7 @@
             // Expected
         }
 
-        try { // Expect IAE when passing a ClassLoader object instead of a java.lang.reflect.Module object.
+        try { // Expect IAE when passing a ClassLoader object instead of a java.lang.Module object.
             ModuleHelper.AddModuleExportsToAll(this_cldr, "p2");
             throw new RuntimeException("Failed to get the expected IAE for bad module");
         } catch(IllegalArgumentException e) {
--- a/test/runtime/modules/JVMAddModulePackage.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/JVMAddModulePackage.java	Tue Mar 28 13:28:24 2017 +0100
@@ -26,7 +26,7 @@
  * @modules java.base/jdk.internal.misc
  * @library /test/lib ..
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI JVMAddModulePackage
--- a/test/runtime/modules/JVMAddReadsModule.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/JVMAddReadsModule.java	Tue Mar 28 13:28:24 2017 +0100
@@ -26,7 +26,7 @@
  * @modules java.base/jdk.internal.misc
  * @library /test/lib ..
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI JVMAddReadsModule
--- a/test/runtime/modules/JVMDefineModule.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/JVMDefineModule.java	Tue Mar 28 13:28:24 2017 +0100
@@ -26,7 +26,7 @@
  * @modules java.base/jdk.internal.misc
  * @library /test/lib ..
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI JVMDefineModule
@@ -78,7 +78,7 @@
             ModuleHelper.DefineModule(new Object(),  "9.0", "mymodule/here", new String[] { "mypackage1" });
             throw new RuntimeException("Failed to get expected IAE or NPE for bad module");
         } catch(IllegalArgumentException e) {
-            if (!e.getMessage().contains("module is not an instance of type java.lang.reflect.Module")) {
+            if (!e.getMessage().contains("module is not an instance of type java.lang.Module")) {
               throw new RuntimeException("Failed to get expected IAE message for bad module: " + e.getMessage());
             }
         }
--- a/test/runtime/modules/JVMGetModuleByPkgName.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/JVMGetModuleByPkgName.java	Tue Mar 28 13:28:24 2017 +0100
@@ -27,7 +27,7 @@
  * @library /test/lib ..
  * @compile p2/c2.java
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI JVMGetModuleByPkgName
@@ -35,7 +35,6 @@
 
 import static jdk.test.lib.Asserts.*;
 import java.lang.ClassLoader;
-import java.lang.reflect.Module;
 
 public class JVMGetModuleByPkgName {
 
--- a/test/runtime/modules/LoadUnloadModuleStress.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/LoadUnloadModuleStress.java	Tue Mar 28 13:28:24 2017 +0100
@@ -27,7 +27,7 @@
  * @modules java.base/jdk.internal.misc
  * @library /test/lib ..
  * @build sun.hotspot.WhiteBox
- * @compile/module=java.base java/lang/reflect/ModuleHelper.java
+ * @compile/module=java.base java/lang/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xmx64m -Xmx64m LoadUnloadModuleStress 15000
--- a/test/runtime/modules/ModuleHelper.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/ModuleHelper.java	Tue Mar 28 13:28:24 2017 +0100
@@ -23,7 +23,6 @@
 
 import java.net.URI;
 import java.lang.module.ModuleDescriptor;
-import java.lang.reflect.Module;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
@@ -41,19 +40,19 @@
     public static void AddModuleExports(Object from, String pkg, Object to) throws Throwable {
         WhiteBox wb = WhiteBox.getWhiteBox();
         wb.AddModuleExports(from, pkg, to);
-        java.lang.reflect.ModuleHelper.addExportsNoSync((Module)from, pkg, (Module)to);
+        java.lang.ModuleHelper.addExportsNoSync((Module)from, pkg, (Module)to);
     }
 
     public static void AddReadsModule(Object from, Object to) throws Throwable {
         WhiteBox wb = WhiteBox.getWhiteBox();
         wb.AddReadsModule(from, to);
-        java.lang.reflect.ModuleHelper.addReadsNoSync((Module)from, (Module)to);
+        java.lang.ModuleHelper.addReadsNoSync((Module)from, (Module)to);
     }
 
     public static void AddModulePackage(Object m, String pkg) throws Throwable {
         WhiteBox wb = WhiteBox.getWhiteBox();
         wb.AddModulePackage(m, pkg);
-        java.lang.reflect.ModuleHelper.addPackageNoSync((Module)m, pkg);
+        java.lang.ModuleHelper.addPackageNoSync((Module)m, pkg);
     }
 
     public static Module GetModuleByPackageName(Object ldr, String pkg) throws Throwable {
@@ -64,13 +63,13 @@
     public static void AddModuleExportsToAllUnnamed(Object m, String pkg) throws Throwable {
         WhiteBox wb = WhiteBox.getWhiteBox();
         wb.AddModuleExportsToAllUnnamed(m, pkg);
-        //java.lang.reflect.ModuleHelper.addExportsToAllUnnamedNoSync((Module)m, pkg);
+        //java.lang.ModuleHelper.addExportsToAllUnnamedNoSync((Module)m, pkg);
     }
 
     public static void AddModuleExportsToAll(Object m, String pkg) throws Throwable {
         WhiteBox wb = WhiteBox.getWhiteBox();
         wb.AddModuleExportsToAll(m, pkg);
-        java.lang.reflect.ModuleHelper.addExportsNoSync((Module)m, pkg, (Module)null);
+        java.lang.ModuleHelper.addExportsNoSync((Module)m, pkg, (Module)null);
     }
 
     public static Module ModuleObject(String name, ClassLoader loader, String[] pkgs) throws Throwable {
@@ -87,7 +86,7 @@
             ModuleDescriptor.newModule(name).packages(pkg_set).build();
         URI uri = URI.create("module:/" + name);
 
-        return java.lang.reflect.ModuleHelper.newModule(loader, descriptor);
+        return java.lang.ModuleHelper.newModule(loader, descriptor);
     }
 
 }
--- a/test/runtime/modules/ModuleStress/ModuleNonBuiltinCLMain.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/ModuleStress/ModuleNonBuiltinCLMain.java	Tue Mar 28 13:28:24 2017 +0100
@@ -25,7 +25,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -47,7 +46,7 @@
 //
 public class ModuleNonBuiltinCLMain {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -90,7 +89,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x, descriptor_m3x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -103,8 +102,8 @@
         map.put("m2x", cl2);
         map.put("m3x", cl3);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
         assertTrue(layer.findLoader("m1x") == cl1);
         assertTrue(layer.findLoader("m2x") == cl2);
         assertTrue(layer.findLoader("m3x") == cl3);
--- a/test/runtime/modules/ModuleStress/ModuleSameCLMain.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/ModuleStress/ModuleSameCLMain.java	Tue Mar 28 13:28:24 2017 +0100
@@ -25,7 +25,6 @@
 
 import static jdk.test.lib.Asserts.*;
 
-import java.lang.reflect.Layer;
 import java.lang.module.Configuration;
 import java.lang.module.ModuleDescriptor;
 import java.lang.module.ModuleFinder;
@@ -45,7 +44,7 @@
 //
 public class ModuleSameCLMain {
 
-    // Create a Layer over the boot layer.
+    // Create a layer over the boot layer.
     // Define modules within this layer to test access between
     // publically defined classes within packages of those modules.
     public void createLayerOnBoot() throws Throwable {
@@ -75,7 +74,7 @@
         ModuleFinder finder = ModuleLibrary.of(descriptor_m1x, descriptor_m2x);
 
         // Resolves "m1x"
-        Configuration cf = Layer.boot()
+        Configuration cf = ModuleLayer.boot()
                 .configuration()
                 .resolve(finder, ModuleFinder.of(), Set.of("m1x"));
 
@@ -85,8 +84,8 @@
         map.put("m1x", cl1);
         map.put("m2x", cl1);
 
-        // Create Layer that contains m1x & m2x
-        Layer layer = Layer.boot().defineModules(cf, map::get);
+        // Create layer that contains m1x & m2x
+        ModuleLayer layer = ModuleLayer.boot().defineModules(cf, map::get);
         assertTrue(layer.findLoader("m1x") == cl1);
         assertTrue(layer.findLoader("m2x") == cl1);
         assertTrue(layer.findLoader("java.base") == null);
--- a/test/runtime/modules/ModuleStress/src/jdk.test/test/Main.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/ModuleStress/src/jdk.test/test/Main.java	Tue Mar 28 13:28:24 2017 +0100
@@ -25,9 +25,7 @@
 
 import java.lang.module.Configuration;
 import java.lang.module.ModuleFinder;
-import java.lang.reflect.Layer;
 import java.lang.reflect.Method;
-import java.lang.reflect.Module;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.*;
@@ -44,7 +42,7 @@
     public static void main(String[] args) throws Exception {
 
         ModuleFinder finder = ModuleFinder.of(MODS_DIR);
-        Layer layerBoot = Layer.boot();
+        ModuleLayer layerBoot = ModuleLayer.boot();
 
         Configuration cf = layerBoot
                 .configuration()
@@ -58,7 +56,7 @@
         Callable<Void> task = new Callable<Void>() {
             @Override
             public Void call() throws Exception {
-                Layer layer = Layer.boot().defineModulesWithOneLoader(cf, scl);
+                ModuleLayer layer = ModuleLayer.boot().defineModulesWithOneLoader(cf, scl);
                 Module transletModule = layer.findModule(MODULE_NAME).get();
                 testModule.addExports("test", transletModule);
                 Class<?> c = layer.findLoader(MODULE_NAME).loadClass("translet.Main");
--- a/test/runtime/modules/ModuleStress/src/jdk.test/test/MainGC.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/ModuleStress/src/jdk.test/test/MainGC.java	Tue Mar 28 13:28:24 2017 +0100
@@ -25,9 +25,7 @@
 
 import java.lang.module.Configuration;
 import java.lang.module.ModuleFinder;
-import java.lang.reflect.Layer;
 import java.lang.reflect.Method;
-import java.lang.reflect.Module;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.*;
@@ -44,7 +42,7 @@
     public static void main(String[] args) throws Exception {
 
         ModuleFinder finder = ModuleFinder.of(MODS_DIR);
-        Layer layerBoot = Layer.boot();
+        ModuleLayer layerBoot = ModuleLayer.boot();
 
         Configuration cf = layerBoot
                 .configuration()
@@ -59,7 +57,7 @@
         Callable<Void> task = new Callable<Void>() {
             @Override
             public Void call() throws Exception {
-                Layer layer = Layer.boot().defineModulesWithOneLoader(cf, scl);
+                ModuleLayer layer = ModuleLayer.boot().defineModulesWithOneLoader(cf, scl);
                 Module transletModule = layer.findModule(MODULE_NAME).get();
                 testModule.addExports("test", transletModule);
                 testModule.addReads(transletModule);
--- a/test/runtime/modules/getModuleJNI/GetModule.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/runtime/modules/getModuleJNI/GetModule.java	Tue Mar 28 13:28:24 2017 +0100
@@ -26,7 +26,6 @@
  * @run main/native GetModule
  */
 
-import java.lang.reflect.Module;
 import java.lang.management.LockInfo;
 public class GetModule {
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/runtime/modules/java.base/java/lang/ModuleHelper.java	Tue Mar 28 13:28:24 2017 +0100
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang;
+
+import java.lang.module.ModuleDescriptor;
+
+/**
+ * A helper class intended to be injected into java.lang using the
+ * java --patch-module option. The helper class provides access to package private
+ * methods in java.lang.Module.
+ */
+
+public final class ModuleHelper {
+
+    private ModuleHelper() { }
+
+    /**
+     * Creates a named module but without defining the module to the VM.
+     */
+    public static Module newModule(ClassLoader loader, ModuleDescriptor descriptor) {
+        return new Module(loader, descriptor);
+    }
+
+    /**
+     * Updates module {@code from} to that it reads module {@code to} without
+     * notifying the VM.
+     */
+    public static void addReadsNoSync(Module from, Module to) {
+        from.implAddReadsNoSync(to);
+    }
+
+    /**
+     * Updates module {@code from} so that it exports package {@code pkg}
+     * to module {@code to} but without notifying the VM. If {@code to} is
+     * {@code null} then the package is exported unconditionally.
+     */
+    public static void addExportsNoSync(Module from, String pkg, Module to) {
+        if (to == null) {
+            from.implAddExportsNoSync(pkg);
+        } else {
+            from.implAddExportsNoSync(pkg, to);
+        }
+    }
+
+    /**
+     * Adds a package to a module without notifying the VM.
+     */
+    public static void addPackageNoSync(Module m, String pkg) {
+        m.implAddPackageNoSync(pkg);
+    }
+
+}
--- a/test/runtime/modules/java.base/java/lang/reflect/ModuleHelper.java	Fri Mar 24 16:56:51 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package java.lang.reflect;
-
-import java.lang.module.ModuleDescriptor;
-
-/**
- * A helper class intended to be injected into java.lang.reflect using the
- * java --patch-module option. The helper class provides access to package private
- * methods in java.lang.reflect.Module.
- */
-
-public final class ModuleHelper {
-
-    private ModuleHelper() { }
-
-    /**
-     * Creates a named module but without defining the module to the VM.
-     */
-    public static Module newModule(ClassLoader loader, ModuleDescriptor descriptor) {
-        return new Module(loader, descriptor);
-    }
-
-    /**
-     * Updates module {@code from} to that it reads module {@code to} without
-     * notifying the VM.
-     */
-    public static void addReadsNoSync(Module from, Module to) {
-        from.implAddReadsNoSync(to);
-    }
-
-    /**
-     * Updates module {@code from} so that it exports package {@code pkg}
-     * to module {@code to} but without notifying the VM. If {@code to} is
-     * {@code null} then the package is exported unconditionally.
-     */
-    public static void addExportsNoSync(Module from, String pkg, Module to) {
-        from.implAddExportsNoSync(pkg, to);
-    }
-
-    /**
-     * Adds a package to a module without notifying the VM.
-     */
-    public static void addPackageNoSync(Module m, String pkg) {
-        m.implAddPackageNoSync(pkg);
-    }
-
-}
--- a/test/serviceability/jdwp/AllModulesCommandTestDebuggee.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/serviceability/jdwp/AllModulesCommandTestDebuggee.java	Tue Mar 28 13:28:24 2017 +0100
@@ -21,8 +21,6 @@
  * questions.
  */
 
-import java.lang.reflect.Module;
-import java.lang.reflect.Layer;
 import java.util.Set;
 import java.util.HashSet;
 
@@ -35,10 +33,10 @@
 
     public static void main(String[] args) throws InterruptedException {
 
-        int modCount = Layer.boot().modules().size();
+        int modCount = ModuleLayer.boot().modules().size();
 
         // Send all modules names via the process output
-        for (Module mod : Layer.boot().modules()) {
+        for (Module mod : ModuleLayer.boot().modules()) {
             String info = String.format("module %s", mod.getName());
             write(info);
         }
--- a/test/serviceability/jvmti/AddModuleExportsAndOpens/MyPackage/AddModuleExportsAndOpensTest.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/serviceability/jvmti/AddModuleExportsAndOpens/MyPackage/AddModuleExportsAndOpensTest.java	Tue Mar 28 13:28:24 2017 +0100
@@ -31,7 +31,6 @@
  */
 
 import java.io.PrintStream;
-import java.lang.reflect.Module;
 
 public class AddModuleExportsAndOpensTest {
 
--- a/test/serviceability/jvmti/AddModuleExportsAndOpens/libAddModuleExportsAndOpensTest.c	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/serviceability/jvmti/AddModuleExportsAndOpens/libAddModuleExportsAndOpensTest.c	Tue Mar 28 13:28:24 2017 +0100
@@ -47,7 +47,7 @@
 #define FAILED 2
 
 static const char *EXC_CNAME = "java/lang/Exception";
-static const char* MOD_CNAME = "Ljava/lang/reflect/Module;";
+static const char* MOD_CNAME = "Ljava/lang/Module;";
 
 static jvmtiEnv *jvmti = NULL;
 static jint result = PASSED;
@@ -143,7 +143,7 @@
     jboolean res = JNI_FALSE;
 
     if (mIsExportedTo == NULL) {
-        const char* sign = "(Ljava/lang/String;Ljava/lang/reflect/Module;)Z";
+        const char* sign = "(Ljava/lang/String;Ljava/lang/Module;)Z";
         const char* name = open ? "isOpen" : "isExported";
         mIsExportedTo = get_method(env, jlrM(env), name, sign);
     }
--- a/test/serviceability/jvmti/AddModuleReads/MyPackage/AddModuleReadsTest.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/serviceability/jvmti/AddModuleReads/MyPackage/AddModuleReadsTest.java	Tue Mar 28 13:28:24 2017 +0100
@@ -32,7 +32,6 @@
 
 import java.io.PrintStream;
 import java.lang.instrument.Instrumentation;
-import java.lang.reflect.Module;
 
 public class AddModuleReadsTest {
 
--- a/test/serviceability/jvmti/AddModuleReads/libAddModuleReadsTest.c	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/serviceability/jvmti/AddModuleReads/libAddModuleReadsTest.c	Tue Mar 28 13:28:24 2017 +0100
@@ -47,7 +47,7 @@
 #define FAILED 2
 
 static const char *EXC_CNAME = "java/lang/Exception";
-static const char* MOD_CNAME = "Ljava/lang/reflect/Module;";
+static const char* MOD_CNAME = "Ljava/lang/Module;";
 
 static jvmtiEnv *jvmti = NULL;
 static jint result = PASSED;
@@ -123,7 +123,7 @@
     jboolean res = JNI_FALSE;
 
     if (mCanRead == NULL) {
-        const char* sign = "(Ljava/lang/reflect/Module;)Z";
+        const char* sign = "(Ljava/lang/Module;)Z";
         mCanRead = get_method(env, jlrM(env), "canRead", sign);
     }
     res = JNI_ENV_PTR(env)->CallBooleanMethod(JNI_ENV_ARG(env, module),
--- a/test/serviceability/jvmti/AddModuleUsesAndProvides/MyPackage/AddModuleUsesAndProvidesTest.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/serviceability/jvmti/AddModuleUsesAndProvides/MyPackage/AddModuleUsesAndProvidesTest.java	Tue Mar 28 13:28:24 2017 +0100
@@ -34,7 +34,6 @@
 
 import java.io.PrintStream;
 import java.lang.TestProvider;
-import java.lang.reflect.Module;
 
 public class AddModuleUsesAndProvidesTest {
 
--- a/test/serviceability/jvmti/AddModuleUsesAndProvides/libAddModuleUsesAndProvidesTest.c	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/serviceability/jvmti/AddModuleUsesAndProvides/libAddModuleUsesAndProvidesTest.c	Tue Mar 28 13:28:24 2017 +0100
@@ -47,7 +47,7 @@
 #define FAILED 2
 
 static const char *EXC_CNAME = "java/lang/Exception";
-static const char* MOD_CNAME = "Ljava/lang/reflect/Module;";
+static const char* MOD_CNAME = "Ljava/lang/Module;";
 
 static jvmtiEnv *jvmti = NULL;
 static jint result = PASSED;
--- a/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java	Tue Mar 28 13:28:24 2017 +0100
@@ -28,8 +28,6 @@
  * @run main/othervm -agentlib:JvmtiGetAllModulesTest JvmtiGetAllModulesTest
  *
  */
-import java.lang.reflect.Layer;
-import java.lang.reflect.Module;
 import java.lang.module.ModuleReference;
 import java.lang.module.ModuleFinder;
 import java.lang.module.ModuleReader;
@@ -79,15 +77,15 @@
         final String MY_MODULE_NAME = "myModule";
 
         // Verify that JVMTI reports exactly the same info as Java regarding the named modules
-        Asserts.assertEquals(Layer.boot().modules(), getModulesJVMTI());
+        Asserts.assertEquals(ModuleLayer.boot().modules(), getModulesJVMTI());
 
         // Load a new named module
         ModuleDescriptor descriptor = ModuleDescriptor.newModule(MY_MODULE_NAME).build();
         ModuleFinder finder = finderOf(descriptor);
         ClassLoader loader = new ClassLoader() {};
-        Configuration parent = Layer.boot().configuration();
+        Configuration parent = ModuleLayer.boot().configuration();
         Configuration cf = parent.resolve(finder, ModuleFinder.of(), Set.of(MY_MODULE_NAME));
-        Layer my = Layer.boot().defineModules(cf, m -> loader);
+        ModuleLayer my = ModuleLayer.boot().defineModules(cf, m -> loader);
 
         // Verify that the loaded module is indeed reported by JVMTI
         Set<Module> jvmtiModules = getModulesJVMTI();
--- a/test/serviceability/jvmti/GetModulesInfo/libJvmtiGetAllModulesTest.c	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/serviceability/jvmti/GetModulesInfo/libJvmtiGetAllModulesTest.c	Tue Mar 28 13:28:24 2017 +0100
@@ -53,7 +53,7 @@
             return NULL;
         }
 
-        array = (*env)->NewObjectArray(env, modules_count, (*env)->FindClass(env, "java/lang/reflect/Module"), NULL);
+        array = (*env)->NewObjectArray(env, modules_count, (*env)->FindClass(env, "java/lang/Module"), NULL);
 
         for (i = 0; i < modules_count; ++i) {
             (*env)->SetObjectArrayElement(env, array, i, modules_ptr[i]);
--- a/test/serviceability/jvmti/GetNamedModule/libGetNamedModuleTest.c	Fri Mar 24 16:56:51 2017 +0000
+++ b/test/serviceability/jvmti/GetNamedModule/libGetNamedModuleTest.c	Tue Mar 28 13:28:24 2017 +0100
@@ -47,7 +47,7 @@
 #define FAILED 2
 
 static const char *EXC_CNAME = "java/lang/Exception";
-static const char* MOD_CNAME = "Ljava/lang/reflect/Module;";
+static const char* MOD_CNAME = "Ljava/lang/Module;";
 
 static jvmtiEnv *jvmti = NULL;
 static jint result = PASSED;