< prev index next >

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

Print this page
8198481: Coding style cleanups for src/java.base/share/classes/jdk/internal/loader
Reviewed-by: alanb, mchung, rriggs


  50 /**
  51  * Find resources and packages in modules defined to the boot class loader or
  52  * resources and packages on the "boot class path" specified via -Xbootclasspath/a.
  53  */
  54 
  55 public class BootLoader {
  56     private BootLoader() { }
  57 
  58     // The unnamed module for the boot loader
  59     private static final Module UNNAMED_MODULE;
  60     private static final String JAVA_HOME = System.getProperty("java.home");
  61 
  62     static {
  63         UNNAMED_MODULE = SharedSecrets.getJavaLangAccess().defineUnnamedModule(null);
  64         setBootLoaderUnnamedModule0(UNNAMED_MODULE);
  65     }
  66 
  67     // ServiceCatalog for the boot class loader
  68     private static final ServicesCatalog SERVICES_CATALOG = ServicesCatalog.create();
  69 
  70     // ClassLoaderValue map for boot class loader
  71     private static final ConcurrentHashMap<?, ?> CLASS_LOADER_VALUE_MAP
  72         = new ConcurrentHashMap<>();
  73 
  74     /**
  75      * Returns the unnamed module for the boot loader.
  76      */
  77     public static Module getUnnamedModule() {
  78         return UNNAMED_MODULE;
  79     }
  80 
  81     /**
  82      * Returns the ServiceCatalog for modules defined to the boot class loader.
  83      */
  84     public static ServicesCatalog getServicesCatalog() {
  85         return SERVICES_CATALOG;
  86     }
  87 
  88     /**
  89      * Returns the ClassLoaderValue map for the boot class loader.
  90      */




  50 /**
  51  * Find resources and packages in modules defined to the boot class loader or
  52  * resources and packages on the "boot class path" specified via -Xbootclasspath/a.
  53  */
  54 
  55 public class BootLoader {
  56     private BootLoader() { }
  57 
  58     // The unnamed module for the boot loader
  59     private static final Module UNNAMED_MODULE;
  60     private static final String JAVA_HOME = System.getProperty("java.home");
  61 
  62     static {
  63         UNNAMED_MODULE = SharedSecrets.getJavaLangAccess().defineUnnamedModule(null);
  64         setBootLoaderUnnamedModule0(UNNAMED_MODULE);
  65     }
  66 
  67     // ServiceCatalog for the boot class loader
  68     private static final ServicesCatalog SERVICES_CATALOG = ServicesCatalog.create();
  69 
  70     // ClassLoaderValue map for the boot class loader
  71     private static final ConcurrentHashMap<?, ?> CLASS_LOADER_VALUE_MAP
  72         = new ConcurrentHashMap<>();
  73 
  74     /**
  75      * Returns the unnamed module for the boot loader.
  76      */
  77     public static Module getUnnamedModule() {
  78         return UNNAMED_MODULE;
  79     }
  80 
  81     /**
  82      * Returns the ServiceCatalog for modules defined to the boot class loader.
  83      */
  84     public static ServicesCatalog getServicesCatalog() {
  85         return SERVICES_CATALOG;
  86     }
  87 
  88     /**
  89      * Returns the ClassLoaderValue map for the boot class loader.
  90      */


< prev index next >