Comparable<ModuleRef>public class ModuleRef extends Object implements Comparable<ModuleRef>
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ModuleRef.ModuleReaderProxy |
| Constructor | Description |
|---|---|
ModuleRef(Object moduleReference,
Object moduleLayer) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
compareTo(ModuleRef o) |
|
boolean |
equals(Object obj) |
|
static List<ModuleRef> |
findModuleRefs(Class<?>[] callStack) |
Get all visible ModuleReferences in all layers, given an array of stack frame
Class<?> references. |
ClassLoader |
getClassLoader() |
Returns the classloader for the module, i.e.
|
Object |
getModuleDescriptor() |
Returns the module descriptor, i.e.
|
Object |
getModuleLayer() |
Returns the module layer (type ModuleLayer).
|
URI |
getModuleLocation() |
Returns the module location, i.e.
|
File |
getModuleLocationFile() |
Returns the module location as a File, i.e.
|
String |
getModuleLocationStr() |
Returns the module location as a string, i.e.
|
String |
getModuleName() |
Returns the module name, i.e.
|
List<String> |
getModulePackages() |
Returns the list of packages in the module.
|
Object |
getModuleReference() |
Returns the module reference (type ModuleReference).
|
int |
hashCode() |
|
boolean |
isSystemModule() |
Returns true if this module's location is a non-"file:/" ("jrt:/") URI, or if it has no location URI, or if
it uses the (null) bootstrap ClassLoader, or if the module name starts with a system prefix ("java.", "jre.",
etc.).
|
ModuleRef.ModuleReaderProxy |
open() |
Open the module, returning a ModuleReader.
|
String |
toString() |
public String getModuleName()
moduleReference.descriptor().name().public Object getModuleReference()
public Object getModuleLayer()
public Object getModuleDescriptor()
moduleReference.descriptor() (type ModuleDescriptor).public List<String> getModulePackages()
public URI getModuleLocation()
moduleReference.location(). Returns null for modules that do not
have a location.public boolean isSystemModule()
public String getModuleLocationStr()
moduleReference.location().toString(). Returns null for
modules that do not have a location.public File getModuleLocationFile()
new File(moduleReference.location()). Returns null for
modules that do not have a location, or for system ("jrt:/") modules.public ClassLoader getClassLoader()
moduleLayer.findLoader(moduleReference.descriptor().name()).public int compareTo(ModuleRef o)
compareTo in interface Comparable<ModuleRef>public ModuleRef.ModuleReaderProxy open() throws IOException
IOExceptionCopyright © 2018. All rights reserved.