< prev index next >

src/java.base/share/classes/jdk/internal/loader/BootLoader.java

Print this page

        

@@ -94,10 +94,18 @@
     public static ConcurrentHashMap<?, ?> getClassLoaderValueMap() {
         return CLASS_LOADER_VALUE_MAP;
     }
 
     /**
+     * Returns {@code true} if there is a class path associated with the
+     * BootLoader.
+     */
+    public static boolean hasClassPath() {
+        return ClassLoaders.bootLoader().hasClassPath();
+    }
+
+    /**
      * Register a module with this class loader so that its classes (and
      * resources) become visible via this class loader.
      */
     public static void loadModule(ModuleReference mref) {
         ClassLoaders.bootLoader().loadModule(mref);

@@ -186,18 +194,10 @@
         return Arrays.stream(getSystemPackageNames())
                      .map(name -> getDefinedPackage(name.replace('/', '.')));
     }
 
     /**
-     * Returns {@code true} if there is a class path associated with the
-     * BootLoader.
-     */
-    public static boolean hasClassPath() {
-        return ClassLoaders.bootLoader().hasClassPath();
-    }
-
-    /**
      * Helper class to define {@code Package} objects for packages in modules
      * defined to the boot loader.
      */
     static class PackageHelper {
         private static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess();
< prev index next >