< prev index next >

src/java.base/share/classes/jdk/internal/module/SystemModuleFinders.java

Print this page




  42 import java.security.PrivilegedAction;
  43 import java.util.ArrayDeque;
  44 import java.util.Collections;
  45 import java.util.Deque;
  46 import java.util.HashMap;
  47 import java.util.HashSet;
  48 import java.util.Iterator;
  49 import java.util.Map;
  50 import java.util.Objects;
  51 import java.util.Optional;
  52 import java.util.Set;
  53 import java.util.Spliterator;
  54 import java.util.function.Consumer;
  55 import java.util.function.Supplier;
  56 import java.util.stream.Stream;
  57 import java.util.stream.StreamSupport;
  58 
  59 import jdk.internal.jimage.ImageLocation;
  60 import jdk.internal.jimage.ImageReader;
  61 import jdk.internal.jimage.ImageReaderFactory;
  62 import jdk.internal.misc.JavaNetUriAccess;
  63 import jdk.internal.misc.SharedSecrets;
  64 import jdk.internal.util.StaticProperty;
  65 import jdk.internal.module.ModuleHashes.HashSupplier;
  66 
  67 /**
  68  * The factory for SystemModules objects and for creating ModuleFinder objects
  69  * that find modules in the runtime image.
  70  *
  71  * This class supports initializing the module system when the runtime is an
  72  * images build, an exploded build, or an images build with java.base patched
  73  * by an exploded java.base. It also supports a testing mode that re-parses
  74  * the module-info.class resources in the run-time image.
  75  */
  76 
  77 public final class SystemModuleFinders {
  78     private static final JavaNetUriAccess JNUA = SharedSecrets.getJavaNetUriAccess();
  79 
  80     private static final boolean USE_FAST_PATH;
  81     static {
  82         String value = System.getProperty("jdk.system.module.finder.disableFastPath");
  83         if (value == null) {




  42 import java.security.PrivilegedAction;
  43 import java.util.ArrayDeque;
  44 import java.util.Collections;
  45 import java.util.Deque;
  46 import java.util.HashMap;
  47 import java.util.HashSet;
  48 import java.util.Iterator;
  49 import java.util.Map;
  50 import java.util.Objects;
  51 import java.util.Optional;
  52 import java.util.Set;
  53 import java.util.Spliterator;
  54 import java.util.function.Consumer;
  55 import java.util.function.Supplier;
  56 import java.util.stream.Stream;
  57 import java.util.stream.StreamSupport;
  58 
  59 import jdk.internal.jimage.ImageLocation;
  60 import jdk.internal.jimage.ImageReader;
  61 import jdk.internal.jimage.ImageReaderFactory;
  62 import jdk.internal.access.JavaNetUriAccess;
  63 import jdk.internal.access.SharedSecrets;
  64 import jdk.internal.util.StaticProperty;
  65 import jdk.internal.module.ModuleHashes.HashSupplier;
  66 
  67 /**
  68  * The factory for SystemModules objects and for creating ModuleFinder objects
  69  * that find modules in the runtime image.
  70  *
  71  * This class supports initializing the module system when the runtime is an
  72  * images build, an exploded build, or an images build with java.base patched
  73  * by an exploded java.base. It also supports a testing mode that re-parses
  74  * the module-info.class resources in the run-time image.
  75  */
  76 
  77 public final class SystemModuleFinders {
  78     private static final JavaNetUriAccess JNUA = SharedSecrets.getJavaNetUriAccess();
  79 
  80     private static final boolean USE_FAST_PATH;
  81     static {
  82         String value = System.getProperty("jdk.system.module.finder.disableFastPath");
  83         if (value == null) {


< prev index next >