< prev index next >

src/java.base/share/classes/java/lang/System.java

Print this page
rev 57943 : 8238599: Refactor and simplify implAddOpensToAllUnnamed
Reviewed-by: alanb


  39 import java.lang.reflect.Constructor;
  40 import java.lang.reflect.Executable;
  41 import java.lang.reflect.Method;
  42 import java.lang.reflect.Modifier;
  43 import java.net.URI;
  44 import java.nio.charset.CharacterCodingException;
  45 import java.security.AccessControlContext;
  46 import java.security.ProtectionDomain;
  47 import java.security.AccessController;
  48 import java.security.PrivilegedAction;
  49 import java.nio.channels.Channel;
  50 import java.nio.channels.spi.SelectorProvider;
  51 import java.nio.charset.Charset;
  52 import java.util.Iterator;
  53 import java.util.List;
  54 import java.util.Map;
  55 import java.util.Objects;
  56 import java.util.Properties;
  57 import java.util.PropertyPermission;
  58 import java.util.ResourceBundle;

  59 import java.util.function.Supplier;
  60 import java.util.concurrent.ConcurrentHashMap;
  61 import java.util.stream.Stream;
  62 
  63 import jdk.internal.util.StaticProperty;
  64 import jdk.internal.module.ModuleBootstrap;
  65 import jdk.internal.module.ServicesCatalog;
  66 import jdk.internal.reflect.CallerSensitive;
  67 import jdk.internal.reflect.Reflection;
  68 import jdk.internal.HotSpotIntrinsicCandidate;
  69 import jdk.internal.access.JavaLangAccess;
  70 import jdk.internal.access.SharedSecrets;
  71 import jdk.internal.misc.VM;
  72 import jdk.internal.logger.LoggerFinderLoader;
  73 import jdk.internal.logger.LazyLoggers;
  74 import jdk.internal.logger.LocalizedLoggerWrapper;
  75 import jdk.internal.util.SystemProps;
  76 import jdk.internal.vm.annotation.Stable;
  77 import sun.nio.fs.DefaultFileSystemProvider;
  78 import sun.reflect.annotation.AnnotationType;


2217                 return new Module(loader);
2218             }
2219             public void addReads(Module m1, Module m2) {
2220                 m1.implAddReads(m2);
2221             }
2222             public void addReadsAllUnnamed(Module m) {
2223                 m.implAddReadsAllUnnamed();
2224             }
2225             public void addExports(Module m, String pn, Module other) {
2226                 m.implAddExports(pn, other);
2227             }
2228             public void addExportsToAllUnnamed(Module m, String pn) {
2229                 m.implAddExportsToAllUnnamed(pn);
2230             }
2231             public void addOpens(Module m, String pn, Module other) {
2232                 m.implAddOpens(pn, other);
2233             }
2234             public void addOpensToAllUnnamed(Module m, String pn) {
2235                 m.implAddOpensToAllUnnamed(pn);
2236             }
2237             public void addOpensToAllUnnamed(Module m, Iterator<String> packages) {
2238                 m.implAddOpensToAllUnnamed(packages);
2239             }
2240             public void addUses(Module m, Class<?> service) {
2241                 m.implAddUses(service);
2242             }
2243             public boolean isReflectivelyExported(Module m, String pn, Module other) {
2244                 return m.isReflectivelyExported(pn, other);
2245             }
2246             public boolean isReflectivelyOpened(Module m, String pn, Module other) {
2247                 return m.isReflectivelyOpened(pn, other);
2248             }
2249             public ServicesCatalog getServicesCatalog(ModuleLayer layer) {
2250                 return layer.getServicesCatalog();
2251             }
2252             public Stream<ModuleLayer> layers(ModuleLayer layer) {
2253                 return layer.layers();
2254             }
2255             public Stream<ModuleLayer> layers(ClassLoader loader) {
2256                 return ModuleLayer.layers(loader);
2257             }
2258 




  39 import java.lang.reflect.Constructor;
  40 import java.lang.reflect.Executable;
  41 import java.lang.reflect.Method;
  42 import java.lang.reflect.Modifier;
  43 import java.net.URI;
  44 import java.nio.charset.CharacterCodingException;
  45 import java.security.AccessControlContext;
  46 import java.security.ProtectionDomain;
  47 import java.security.AccessController;
  48 import java.security.PrivilegedAction;
  49 import java.nio.channels.Channel;
  50 import java.nio.channels.spi.SelectorProvider;
  51 import java.nio.charset.Charset;
  52 import java.util.Iterator;
  53 import java.util.List;
  54 import java.util.Map;
  55 import java.util.Objects;
  56 import java.util.Properties;
  57 import java.util.PropertyPermission;
  58 import java.util.ResourceBundle;
  59 import java.util.Set;
  60 import java.util.function.Supplier;
  61 import java.util.concurrent.ConcurrentHashMap;
  62 import java.util.stream.Stream;
  63 
  64 import jdk.internal.util.StaticProperty;
  65 import jdk.internal.module.ModuleBootstrap;
  66 import jdk.internal.module.ServicesCatalog;
  67 import jdk.internal.reflect.CallerSensitive;
  68 import jdk.internal.reflect.Reflection;
  69 import jdk.internal.HotSpotIntrinsicCandidate;
  70 import jdk.internal.access.JavaLangAccess;
  71 import jdk.internal.access.SharedSecrets;
  72 import jdk.internal.misc.VM;
  73 import jdk.internal.logger.LoggerFinderLoader;
  74 import jdk.internal.logger.LazyLoggers;
  75 import jdk.internal.logger.LocalizedLoggerWrapper;
  76 import jdk.internal.util.SystemProps;
  77 import jdk.internal.vm.annotation.Stable;
  78 import sun.nio.fs.DefaultFileSystemProvider;
  79 import sun.reflect.annotation.AnnotationType;


2218                 return new Module(loader);
2219             }
2220             public void addReads(Module m1, Module m2) {
2221                 m1.implAddReads(m2);
2222             }
2223             public void addReadsAllUnnamed(Module m) {
2224                 m.implAddReadsAllUnnamed();
2225             }
2226             public void addExports(Module m, String pn, Module other) {
2227                 m.implAddExports(pn, other);
2228             }
2229             public void addExportsToAllUnnamed(Module m, String pn) {
2230                 m.implAddExportsToAllUnnamed(pn);
2231             }
2232             public void addOpens(Module m, String pn, Module other) {
2233                 m.implAddOpens(pn, other);
2234             }
2235             public void addOpensToAllUnnamed(Module m, String pn) {
2236                 m.implAddOpensToAllUnnamed(pn);
2237             }
2238             public void addOpensToAllUnnamed(Module m, Set<String> concealedPackages, Set<String> exportedPackages) {
2239                 m.implAddOpensToAllUnnamed(concealedPackages, exportedPackages);
2240             }
2241             public void addUses(Module m, Class<?> service) {
2242                 m.implAddUses(service);
2243             }
2244             public boolean isReflectivelyExported(Module m, String pn, Module other) {
2245                 return m.isReflectivelyExported(pn, other);
2246             }
2247             public boolean isReflectivelyOpened(Module m, String pn, Module other) {
2248                 return m.isReflectivelyOpened(pn, other);
2249             }
2250             public ServicesCatalog getServicesCatalog(ModuleLayer layer) {
2251                 return layer.getServicesCatalog();
2252             }
2253             public Stream<ModuleLayer> layers(ModuleLayer layer) {
2254                 return layer.layers();
2255             }
2256             public Stream<ModuleLayer> layers(ClassLoader loader) {
2257                 return ModuleLayer.layers(loader);
2258             }
2259 


< prev index next >