java.lang.Module. On platforms that do not support the module API, modules are represented by null.
| Modifier and Type | Class and Description |
|---|---|
| protected static interface | JavaModule.Module
A proxy for interacting with |
| protected static interface | JavaModule.Resolver
A proxy for resolving a |
| Modifier and Type | Field and Description |
|---|---|
| protected static final JavaModule. | MODULE
A dispatcher to interact with |
| private final AnnotatedElement | module
The |
| protected static final JavaModule. | |
| public static final JavaModule | UNSUPPORTED
Canonical representation of a Java module on a JVM that does not support the module API. |
| Access | Constructor and Description |
|---|---|
| protected | JavaModule(AnnotatedElement
The module)java.lang.Module instance this wrapper represents.Creates a new Java module representation. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if this module can read the supplied module.The module to check for its readability by this module. module)Checks if this module can read the exported packages of the supplied module. |
| private static < The type of the action's resolved value. T> T | Returns: The action's resolved value.The action to execute from a privileged context. action)A proxy for |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public String | getActualName()
Implements net. |
| public ClassLoader | Returns: The class loader of the represented module.Returns the class loader of this module. |
| public AnnotationList | getDeclaredAnnotations()
Implements net. |
| public Set | Returns: A set of the names of the packages that are defined by this module.Returns the packages of this module. |
| public InputStream | Returns: An input stream for the resource ornull if it does not exist.The name of the resource. name)Returns a resource stream for this module for a resource of the given name or |
| public int | |
| public boolean | Returns: true if this module exports the supplied package to this module.The package to check for packageDescription, JavaModule The target module. module)Returns |
| public boolean | isNamed()
Implements net. true if this element has an explicit name.
|
| public boolean | Returns: true if this module opens the supplied package to this module.The package to check for. packageDescription, JavaModule The target module. module)Returns |
| public static boolean | Returns: true if the current VM supports modules.Checks if the current VM supports the |
| public static JavaModule | |
| public static JavaModule | |
| public String | |
| public Object |
| MODULE | back to summary |
|---|---|
| protected static final JavaModule. A dispatcher to interact with | |
| module | back to summary |
|---|---|
| private final AnnotatedElement module The | |
| RESOLVER | back to summary |
|---|---|
| protected static final JavaModule. A dispatcher to resolve a | |
| UNSUPPORTED | back to summary |
|---|---|
| public static final JavaModule UNSUPPORTED Canonical representation of a Java module on a JVM that does not support the module API. | |
| JavaModule | back to summary |
|---|---|
| protected JavaModule(AnnotatedElement module) Creates a new Java module representation.
| |
| canRead | back to summary |
|---|---|
| public boolean canRead(JavaModule module) Checks if this module can read the exported packages of the supplied module.
| |
| doPrivileged | back to summary |
|---|---|
| private static <T> T doPrivileged(PrivilegedAction<T> action) A proxy for
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) 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. | |
| getActualName | back to summary |
|---|---|
| public String getActualName() Implements net. Doc from net. Returns the display name of this element as it is found in the source code. If no such name exists, an empty string is returned.
| |
| getClassLoader | back to summary |
|---|---|
| public ClassLoader getClassLoader() Returns the class loader of this module.
| |
| getDeclaredAnnotations | back to summary |
|---|---|
| public AnnotationList getDeclaredAnnotations() Implements net. Doc from net. Returns a list of annotations that are declared by this instance.
| |
| getPackages | back to summary |
|---|---|
| public Set Returns the packages of this module. | |
| getResourceAsStream | back to summary |
|---|---|
| public InputStream getResourceAsStream(String name) throws IOException Returns a resource stream for this module for a resource of the given name or
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isExported | back to summary |
|---|---|
| public boolean isExported(PackageDescription packageDescription, JavaModule module) Returns
| |
| isNamed | back to summary |
|---|---|
| public boolean isNamed() Implements net. Doc from net. Returns
| |
| isOpened | back to summary |
|---|---|
| public boolean isOpened(PackageDescription packageDescription, JavaModule module) Returns
| |
| isSupported | back to summary |
|---|---|
| public static boolean isSupported() Checks if the current VM supports the
| |
| of | back to summary |
|---|---|
| public static JavaModule of(Object module) Represents the supplied
| |
| ofType | back to summary |
|---|---|
| public static JavaModule ofType(Class<?> type) Returns a representation of the supplied type's
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| unwrap | back to summary |
|---|---|
| public Object unwrap() Unwraps this instance to a
| |
java.lang.Module.
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public ClassLoader | Returns: The module's class loader.The value)java.lang.Module for which to return a class loader.Returns the class loader of a module. |
| public String | |
| public Set | Returns: The module's packages.The value)java.lang.Module to check for its packages.Returns the module's exported packages. |
| public InputStream | Returns: An input stream for the resource ornull if it does not exist.The value, String java.lang.Module instance to apply this method upon.The name of the resource. name)Returns a resource stream for this module for a resource of the given name or |
| public boolean | Returns: true if the source module exports the supplied package to the target module.The source module. value, String The name of the package to check. aPackage, Object The target module. target)Returns |
| public boolean | Returns: true if the supplied value is a java.lang.Module.The instance to investigate. value)Returns |
| public boolean | |
| public boolean |
| canRead | back to summary |
|---|---|
| public boolean canRead(Object value, Object target) Checks if the source module can read the target module. | |
| getClassLoader | back to summary |
|---|---|
| public ClassLoader getClassLoader(Object value) Returns the class loader of a module.
| |
| getName | back to summary |
|---|---|
| public String getName(Object value) Returns the module's name. | |
| getPackages | back to summary |
|---|---|
| public Set Returns the module's exported packages. | |
| getResourceAsStream | back to summary |
|---|---|
| public InputStream getResourceAsStream(Object value, String name) throws IOException Returns a resource stream for this module for a resource of the given name or
| |
| isExported | back to summary |
|---|---|
| public boolean isExported(Object value, String aPackage, Object target) Returns | |
| isInstance | back to summary |
|---|---|
| public boolean isInstance(Object value) Returns | |
| isNamed | back to summary |
|---|---|
| public boolean isNamed(Object value) Returns
| |
| isOpen | back to summary |
|---|---|
| public boolean isOpen(Object value, String aPackage, Object target) Returns | |
Class's java.lang.Module.
| Modifier and Type | Method and Description |
|---|---|
| public Object |
| getModule | back to summary |
|---|---|
| public Object getModule(Class<?> type) Resolves the | |