| Modifier and Type | Field and Description |
|---|---|
| private final ClassLoader | classLoader
The ClassLoader that loads classes in the module. |
| private final Object | descriptor
The ModuleDescriptor for the module. |
| private final Object | layer
The ModuleLayer for the module. |
| private final URI | location
The location URI for the module (may be null). |
| private File | locationFile
A file formed from the location URI. |
| private String | locationStr
The location URI for the module, as a cached string (may be null). |
| private final String | name
The name of the module. |
| private final List | packages
The packages in the module. |
| private String | rawVersion
The raw module version, or null if none. |
| private final Object | reference
The ModuleReference for the module. |
| pack-priv ReflectionUtils |
| Access | Constructor and Description |
|---|---|
| public | ModuleRef(final Object
The module reference, of JPMS type ModuleReference. moduleReference, final Object The module layer, of JPMS type ModuleLayer moduleLayer, final ReflectionUtils The ReflectionUtils instance. reflectionUtils)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(final ModuleRef
the object to be compared. o)Implements java. Compares this object with the specified object for order. |
| public boolean | equals(final Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public ClassLoader | Returns: The classloader for the module, i.e.moduleLayer.findLoader(getReference().descriptor().name()).Get the class loader for the module. |
| public Object | Returns: The module descriptor, i.e.getReference().descriptor() (of JPMS type ModuleDescriptor).Get the module descriptor, i.e. |
| public Object | Returns: The module layer (of JPMS type ModuleLayer).Get the module layer (of JPMS type ModuleLayer). |
| public URI | Returns: The module location, i.e.getReference().location(). Returns null for modules that do not
have a location.Get the module location, i.e. |
| public File | Returns: The module location as a File, i.e.new File(getReference().location()). Returns null for
modules that do not have a location, or for modules whole location is a "jrt:" URI.Get the module location as a File, i.e. |
| public String | Returns: The module location as a string, i.e.getReference().location().toString(). Returns null for
modules that do not have a location.Get the module location as a string, i.e. |
| public String | Returns: The module name, i.e.getReference().descriptor().name(). Potentially null or empty.Get the module name, i.e. |
| public List | Returns: The list of packages in the module. (Does not include non-package directories.)Get a list of packages in the module. |
| public String | Returns: The raw version of the module, obtained byModuleReference#rawVersion().orElse(null).Get the raw version string of the module, or null if the module did not provide one. |
| public Object | Returns: The module reference (of JPMS type ModuleReference).Get the module reference (of JPMS type ModuleReference). |
| public int | |
| public boolean | Returns: true if this module is a system module.Checks if this module is a system module. |
| public ModuleReaderProxy | |
| public String |
| classLoader | back to summary |
|---|---|
| private final ClassLoader classLoader The ClassLoader that loads classes in the module. May be null, to represent the bootstrap classloader. | |
| descriptor | back to summary |
|---|---|
| private final Object descriptor The ModuleDescriptor for the module. | |
| layer | back to summary |
|---|---|
| private final Object layer The ModuleLayer for the module. | |
| location | back to summary |
|---|---|
| private final URI location The location URI for the module (may be null). | |
| locationFile | back to summary |
|---|---|
| private File locationFile A file formed from the location URI. The file will not exist if the location URI is a "jrt:" URI. | |
| locationStr | back to summary |
|---|---|
| private String locationStr The location URI for the module, as a cached string (may be null). | |
| name | back to summary |
|---|---|
| private final String name The name of the module. | |
| packages | back to summary |
|---|---|
| private final List<String> packages The packages in the module. | |
| rawVersion | back to summary |
|---|---|
| private String rawVersion The raw module version, or null if none. | |
| reference | back to summary |
|---|---|
| private final Object reference The ModuleReference for the module. | |
| reflectionUtils | back to summary |
|---|---|
| pack-priv ReflectionUtils reflectionUtils | |
| ModuleRef | back to summary |
|---|---|
| public ModuleRef(final Object moduleReference, final Object moduleLayer, final ReflectionUtils reflectionUtils) Constructor.
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(final ModuleRef o) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getClassLoader | back to summary |
|---|---|
| public ClassLoader getClassLoader() Get the class loader for the module.
| |
| getDescriptor | back to summary |
|---|---|
| public Object getDescriptor() Get the module descriptor, i.e.
| |
| getLayer | back to summary |
|---|---|
| public Object getLayer() Get the module layer (of JPMS type ModuleLayer).
| |
| getLocation | back to summary |
|---|---|
| public URI getLocation() Get the module location, i.e.
| |
| getLocationFile | back to summary |
|---|---|
| public File getLocationFile() Get the module location as a File, i.e.
| |
| getLocationStr | back to summary |
|---|---|
| public String getLocationStr() Get the module location as a string, i.e.
| |
| getName | back to summary |
|---|---|
| public String getName() Get the module name, i.e.
| |
| getPackages | back to summary |
|---|---|
| public List Get a list of packages in the module. (Does not include non-package directories.) | |
| getRawVersion | back to summary |
|---|---|
| public String getRawVersion() Get the raw version string of the module, or null if the module did not provide one.
| |
| getReference | back to summary |
|---|---|
| public Object getReference() Get the module reference (of JPMS type ModuleReference).
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isSystemModule | back to summary |
|---|---|
| public boolean isSystemModule() Checks if this module is a system module.
| |
| open | back to summary |
|---|---|
| public ModuleReaderProxy open() throws IOException Open the module, returning a
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |