public static enum JavaModule.Dispatcher.Disabled extends Enum<JavaModule.Dispatcher.Disabled> implements JavaModule.Dispatcher
java.lang.Module API.JavaModule.Dispatcher.CreationAction, JavaModule.Dispatcher.Disabled, JavaModule.Dispatcher.Enabled| Enum Constant and Description | 
|---|
| INSTANCEThe singleton instance. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | canRead(Object source,
       Object target)Checks if the source module can read the target module. | 
| ClassLoader | getClassLoader(Object module)Returns the module's class loader. | 
| String | getName(Object module)Returns the module's name. | 
| InputStream | getResourceAsStream(Object module,
                   String name)Returns a resource stream for this module for a resource of the given name or  nullif such a resource does not exist. | 
| boolean | isAlive()Checks if this dispatcher is alive, i.e. | 
| boolean | isExported(Object source,
          Object target,
          String aPackage)Returns  trueif the source module exports the supplied package to the target module. | 
| boolean | isNamed(Object module)Returns  trueif the supplied module is named. | 
| boolean | isOpened(Object source,
        Object target,
        String aPackage)Returns  trueif the source module opens the supplied package to the target module. | 
| void | modify(Instrumentation instrumentation,
      Object module,
      Set<Object> reads,
      Map<String,Set<Object>> exports,
      Map<String,Set<Object>> opens,
      Set<Class<?>> uses,
      Map<Class<?>,List<Class<?>>> provides)Modifies this module's properties. | 
| JavaModule | moduleOf(Class<?> type)Extracts the Java  Modulefor the provided class or returnsnullif the current VM does not support modules. | 
| static JavaModule.Dispatcher.Disabled | valueOf(String name)Returns the enum constant of this type with the specified name. | 
| static JavaModule.Dispatcher.Disabled[] | values()Returns an array containing the constants of this enum type, in
the order they are declared. | 
public static final JavaModule.Dispatcher.Disabled INSTANCE
public static JavaModule.Dispatcher.Disabled[] values()
for (JavaModule.Dispatcher.Disabled c : JavaModule.Dispatcher.Disabled.values()) System.out.println(c);
public static JavaModule.Dispatcher.Disabled valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic boolean isAlive()
isAlive in interface JavaModule.Dispatchertrue if modules are supported on the current VM.public JavaModule moduleOf(Class<?> type)
Module for the provided class or returns null if the current VM does not support modules.moduleOf in interface JavaModule.Dispatchertype - The type for which to extract the module.Module or null if the current VM does not support modules.public ClassLoader getClassLoader(Object module)
getClassLoader in interface JavaModule.Dispatchermodule - The java.lang.Modulepublic boolean isNamed(Object module)
true if the supplied module is named.isNamed in interface JavaModule.Dispatchermodule - The java.lang.Module to check for the existence of a name.true if the supplied module is named.public String getName(Object module)
getName in interface JavaModule.Dispatchermodule - The java.lang.Module to check for its name.public InputStream getResourceAsStream(Object module, String name)
null if such a resource does not exist.getResourceAsStream in interface JavaModule.Dispatchermodule - The java.lang.Module instance to apply this method upon.name - The name of the resource.null if it does not exist.public boolean isExported(Object source, Object target, String aPackage)
true if the source module exports the supplied package to the target module.isExported in interface JavaModule.Dispatchersource - The source module.target - The target module.aPackage - The name of the package to check.true if the source module exports the supplied package to the target module.public boolean isOpened(Object source, Object target, String aPackage)
true if the source module opens the supplied package to the target module.isOpened in interface JavaModule.Dispatchersource - The source module.target - The target module.aPackage - The name of the package to check.true if the source module opens the supplied package to the target module.public boolean canRead(Object source, Object target)
canRead in interface JavaModule.Dispatchersource - The source module.target - The target module.true if the source module can read the target module.public void modify(Instrumentation instrumentation, Object module, Set<Object> reads, Map<String,Set<Object>> exports, Map<String,Set<Object>> opens, Set<Class<?>> uses, Map<Class<?>,List<Class<?>>> provides)
modify in interface JavaModule.Dispatcherinstrumentation - The instrumentation instace to use for applying the modification.module - The module to modify.reads - A set of additional modules this module should read.exports - A map of packages to export to a set of modules.opens - A map of packages to open to a set of modules.uses - A set of provider interfaces to use by this module.provides - A map of provider interfaces to provide by this module mapped to the provider implementations.Copyright © 2014–2019. All rights reserved.