< prev index next >

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

Print this page
8200125: Fix some classloader/module typos
Reviewed-by: alanb


  83     public static ServicesCatalog getServicesCatalog() {
  84         return SERVICES_CATALOG;
  85     }
  86 
  87     /**
  88      * Returns the ClassLoaderValue map for the boot class loader.
  89      */
  90     public static ConcurrentHashMap<?, ?> getClassLoaderValueMap() {
  91         return CLASS_LOADER_VALUE_MAP;
  92     }
  93 
  94     /**
  95      * Returns {@code true} if there is a class path associated with the
  96      * BootLoader.
  97      */
  98     public static boolean hasClassPath() {
  99         return ClassLoaders.bootLoader().hasClassPath();
 100     }
 101 
 102     /**
 103      * Register a module with this class loader so that its classes (and
 104      * resources) become visible via this class loader.
 105      */
 106     public static void loadModule(ModuleReference mref) {
 107         ClassLoaders.bootLoader().loadModule(mref);
 108     }
 109 
 110     /**
 111      * Loads the Class object with the given name defined to the boot loader.
 112      */
 113     public static Class<?> loadClassOrNull(String name) {
 114         return ClassLoaders.bootLoader().loadClassOrNull(name);
 115     }
 116 
 117     /**
 118      * Loads the Class object with the given name in the given module
 119      * defined to the boot loader. Returns {@code null} if not found.
 120      */
 121     public static Class<?> loadClass(Module module, String name) {
 122         Class<?> c = loadClassOrNull(name);
 123         if (c != null && c.getModule() == module) {
 124             return c;




  83     public static ServicesCatalog getServicesCatalog() {
  84         return SERVICES_CATALOG;
  85     }
  86 
  87     /**
  88      * Returns the ClassLoaderValue map for the boot class loader.
  89      */
  90     public static ConcurrentHashMap<?, ?> getClassLoaderValueMap() {
  91         return CLASS_LOADER_VALUE_MAP;
  92     }
  93 
  94     /**
  95      * Returns {@code true} if there is a class path associated with the
  96      * BootLoader.
  97      */
  98     public static boolean hasClassPath() {
  99         return ClassLoaders.bootLoader().hasClassPath();
 100     }
 101 
 102     /**
 103      * Registers a module with this class loader so that its classes
 104      * (and resources) become visible via this class loader.
 105      */
 106     public static void loadModule(ModuleReference mref) {
 107         ClassLoaders.bootLoader().loadModule(mref);
 108     }
 109 
 110     /**
 111      * Loads the Class object with the given name defined to the boot loader.
 112      */
 113     public static Class<?> loadClassOrNull(String name) {
 114         return ClassLoaders.bootLoader().loadClassOrNull(name);
 115     }
 116 
 117     /**
 118      * Loads the Class object with the given name in the given module
 119      * defined to the boot loader. Returns {@code null} if not found.
 120      */
 121     public static Class<?> loadClass(Module module, String name) {
 122         Class<?> c = loadClassOrNull(name);
 123         if (c != null && c.getModule() == module) {
 124             return c;


< prev index next >