public static enum JavaModule.Dispatcher.Disabled extends java.lang.Enum<JavaModule.Dispatcher.Disabled> implements JavaModule.Dispatcher
java.lang.Module API.JavaModule.Dispatcher.CreationAction, JavaModule.Dispatcher.Disabled, JavaModule.Dispatcher.Enabled| Enum Constant and Description |
|---|
INSTANCE
The singleton instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addReads(java.lang.instrument.Instrumentation instrumentation,
java.lang.Object source,
java.lang.Object target)
Adds a read-edge from the source to the target module.
|
boolean |
canRead(java.lang.Object source,
java.lang.Object target)
Checks if the source module can read the target module.
|
java.lang.ClassLoader |
getClassLoader(java.lang.Object module)
Returns the module's class loader.
|
java.lang.String |
getName(java.lang.Object module)
Returns the module's name.
|
java.io.InputStream |
getResourceAsStream(java.lang.Object module,
java.lang.String name)
Returns a resource stream for this module for a resource of the given name or
null if such a resource does not exist. |
boolean |
isAlive()
Checks if this dispatcher is alive, i.e.
|
boolean |
isNamed(java.lang.Object module)
Returns
true if the supplied module is named. |
JavaModule |
moduleOf(java.lang.Class<?> type)
Extracts the Java
Module for the provided class or returns null if the current VM does not support modules. |
static JavaModule.Dispatcher.Disabled |
valueOf(java.lang.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(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic boolean isAlive()
isAlive in interface JavaModule.Dispatchertrue if modules are supported on the current VM.public JavaModule moduleOf(java.lang.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 java.lang.ClassLoader getClassLoader(java.lang.Object module)
getClassLoader in interface JavaModule.Dispatchermodule - The java.lang.Modulepublic boolean isNamed(java.lang.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 java.lang.String getName(java.lang.Object module)
getName in interface JavaModule.Dispatchermodule - The java.lang.Module to check for its name.public java.io.InputStream getResourceAsStream(java.lang.Object module,
java.lang.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 canRead(java.lang.Object source,
java.lang.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 addReads(java.lang.instrument.Instrumentation instrumentation,
java.lang.Object source,
java.lang.Object target)
addReads in interface JavaModule.Dispatcherinstrumentation - The instrumentation instance to use for adding the edge.source - The source module.target - The target module.