Comparable<ModuleRef>
public class ModuleRef extends Object implements Comparable<ModuleRef>
Constructor | Description |
---|---|
ModuleRef(Object moduleReference,
Object moduleLayer) |
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(ModuleRef o) |
|
boolean |
equals(Object obj) |
|
ClassLoader |
getClassLoader() |
|
Object |
getDescriptor() |
|
Object |
getLayer() |
|
URI |
getLocation() |
|
File |
getLocationFile() |
|
String |
getLocationStr() |
|
String |
getName() |
|
List<String> |
getPackages() |
|
Object |
getReference() |
|
int |
hashCode() |
|
boolean |
isSystemModule() |
|
ModuleReaderProxy |
open() |
Open the module, returning a
ModuleReaderProxy . |
String |
toString() |
public String getName()
getReference().descriptor().name()
.public Object getReference()
public Object getLayer()
public Object getDescriptor()
getReference().descriptor()
(of JPMS type ModuleDescriptor).public List<String> getPackages()
public URI getLocation()
getReference().location()
. Returns null for modules that do not
have a location.public String getLocationStr()
getReference().location().toString()
. Returns null for
modules that do not have a location.public File getLocationFile()
new File(getReference().location())
. Returns null for
modules that do not have a location, or for system ("jrt:/") modules.public boolean isSystemModule()
public ClassLoader getClassLoader()
moduleLayer.findLoader(getReference().descriptor().name())
.public int compareTo(ModuleRef o)
compareTo
in interface Comparable<ModuleRef>
public ModuleReaderProxy open() throws IOException
ModuleReaderProxy
.ModuleReaderProxy
for the module.IOException
- If the module cannot be opened.Copyright © 2018. All rights reserved.