public static class JavaModule.Dispatcher.Enabled extends Object implements JavaModule.Dispatcher
java.lang.reflect.Module
API.JavaModule.Dispatcher.Disabled, JavaModule.Dispatcher.Enabled
Modifier | Constructor and Description |
---|---|
protected |
Enabled(Method getModule,
Method getClassLoader,
Method isNamed,
Method getName)
Creates a new enabled dispatcher.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
ClassLoader |
getClassLoader(Object module)
Returns the module's class loader.
|
String |
getName(Object module)
Returns the module's name.
|
int |
hashCode() |
boolean |
isNamed(Object module)
Returns
true if the supplied module is named. |
JavaModule |
moduleOf(Class<?> type)
Extracts the Java
Module for the provided class or returns null if the current VM does not support modules. |
String |
toString() |
protected Enabled(Method getModule, Method getClassLoader, Method isNamed, Method getName)
getModule
- The java.lang.Class#getModule()
method.getClassLoader
- The java.lang.reflect.Module#getClassLoader()
method.isNamed
- The java.lang.reflect.Module#isNamed()
method.getName
- The java.lang.reflect.Module#getName()
method.public JavaModule moduleOf(Class<?> type)
JavaModule.Dispatcher
Module
for the provided class or returns null
if the current VM does not support modules.moduleOf
in interface JavaModule.Dispatcher
type
- The type for which to extract the module.Module
or null
if the current VM does not support modules.public ClassLoader getClassLoader(Object module)
JavaModule.Dispatcher
getClassLoader
in interface JavaModule.Dispatcher
module
- The java.lang.reflect.Module
public boolean isNamed(Object module)
JavaModule.Dispatcher
true
if the supplied module is named.isNamed
in interface JavaModule.Dispatcher
module
- The java.lang.reflect.Module
to check for the existence of a name.true
if the supplied module is named.public String getName(Object module)
JavaModule.Dispatcher
getName
in interface JavaModule.Dispatcher
module
- The java.lang.reflect.Module
to check for its name.Copyright © 2014–2016. All rights reserved.