Interface JavaModule.Module
- Enclosing class:
JavaModule
A proxy for interacting with
java.lang.Module.-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the source module can read the target module.getClassLoader(Object value) Returns the class loader of a module.Returns the module's name.getPackages(Object value) Returns the module's exported packages.getResourceAsStream(Object value, String name) Returns a resource stream for this module for a resource of the given name ornullif such a resource does not exist.booleanisExported(Object value, String aPackage, Object target) Returnstrueif the source module exports the supplied package to the target module.booleanisInstance(Object value) Returnstrueif the supplied instance is of typejava.lang.Module.booleanReturnstrueif the supplied module is named.booleanReturnstrueif the source module opens the supplied package to the target module.
-
Method Details
-
isInstance
-
isNamed
Returnstrueif the supplied module is named.- Parameters:
value- Thejava.lang.Moduleto check for the existence of a name.- Returns:
trueif the supplied module is named.
-
getName
-
getPackages
-
getClassLoader
Returns the class loader of a module.- Parameters:
value- Thejava.lang.Modulefor which to return a class loader.- Returns:
- The module's class loader.
-
getResourceAsStream
Returns a resource stream for this module for a resource of the given name ornullif such a resource does not exist.- Parameters:
value- Thejava.lang.Moduleinstance to apply this method upon.name- The name of the resource.- Returns:
- An input stream for the resource or
nullif it does not exist. - Throws:
IOException- If an I/O exception occurs.
-
isExported
Returnstrueif the source module exports the supplied package to the target module.- Parameters:
value- The source module.aPackage- The name of the package to check.target- The target module.- Returns:
trueif the source module exports the supplied package to the target module.
-
isOpen
Returnstrueif the source module opens the supplied package to the target module.- Parameters:
value- The source module.aPackage- The name of the package to check.target- The target module.- Returns:
trueif the source module opens the supplied package to the target module.
-
canRead
-