Package io.github.classgraph
Class ModulePathInfo
- java.lang.Object
-
- io.github.classgraph.ModulePathInfo
-
public class ModulePathInfo extends java.lang.Object
Information on the module path. Note that this will only include module system parameters actually listed in commandline arguments -- in particular this does not include classpath elements from the traditional classpath, or system modules.
-
-
Field Summary
Fields Modifier and Type Field Description java.util.Set<java.lang.String>
addExports
The moduleexports
directives added on the commandline using the--add-exports
switch, as an ordered set of strings in the format<source-module>/<package>=<target-module>(,<target-module>)*
, in the order they were listed on the commandline.java.util.Set<java.lang.String>
addModules
The modules added to the module path on the commandline using the--add-modules
switch, as an ordered set of module names, in the order they were listed on the commandline.java.util.Set<java.lang.String>
addOpens
The moduleopens
directives added on the commandline using the--add-opens
switch, as an ordered set of strings in the format<source-module>/<package>=<target-module>(,<target-module>)*
, in the order they were listed on the commandline.java.util.Set<java.lang.String>
addReads
The modulereads
directives added on the commandline using the--add-reads
switch, as an ordered set of strings in the format<source-module>=<target-module>
, in the order they were listed on the commandline.java.util.Set<java.lang.String>
modulePath
The module path provided on the commandline by the--module-path
or-p
switch, as an ordered set of module names, in the order they were listed on the commandline.java.util.Set<java.lang.String>
patchModules
The module patch directives listed on the commandline using the--patch-module
switch, as an ordered set of strings in the format<module>=<file>
, in the order they were listed on the commandline.
-
Constructor Summary
Constructors Constructor Description ModulePathInfo()
Construct aModulePathInfo
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
toString()
Return the module path info in commandline format.
-
-
-
Field Detail
-
modulePath
public final java.util.Set<java.lang.String> modulePath
The module path provided on the commandline by the--module-path
or-p
switch, as an ordered set of module names, in the order they were listed on the commandline.Note that some modules (such as system modules) will not be in this set, as they are added to the module system automatically by the runtime. Call
ClassGraph.getModules()
orScanResult.getModules()
to get all modules visible at runtime.
-
addModules
public final java.util.Set<java.lang.String> addModules
The modules added to the module path on the commandline using the--add-modules
switch, as an ordered set of module names, in the order they were listed on the commandline. Note that valid module names includeALL-DEFAULT
,ALL-SYSTEM
, andALL-MODULE-PATH
(see JEP 261 for info).
-
patchModules
public final java.util.Set<java.lang.String> patchModules
The module patch directives listed on the commandline using the--patch-module
switch, as an ordered set of strings in the format<module>=<file>
, in the order they were listed on the commandline.
-
addExports
public final java.util.Set<java.lang.String> addExports
The moduleexports
directives added on the commandline using the--add-exports
switch, as an ordered set of strings in the format<source-module>/<package>=<target-module>(,<target-module>)*
, in the order they were listed on the commandline. Additionally, if thisModulePathInfo
object was obtained fromScanResult.getModulePathInfo()
rather thanClassGraph.getModulePathInfo()
, any additionalAdd-Exports
entries found in manifest files during classpath scanning will be appended to this list, in the format<source-module>/<package>=ALL-UNNAMED
.
-
addOpens
public final java.util.Set<java.lang.String> addOpens
The moduleopens
directives added on the commandline using the--add-opens
switch, as an ordered set of strings in the format<source-module>/<package>=<target-module>(,<target-module>)*
, in the order they were listed on the commandline. Additionally, if thisModulePathInfo
object was obtained fromScanResult.getModulePathInfo()
rather thanClassGraph.getModulePathInfo()
, any additionalAdd-Opens
entries found in manifest files during classpath scanning will be appended to this list, in the format<source-module>/<package>=ALL-UNNAMED
.
-
addReads
public final java.util.Set<java.lang.String> addReads
The modulereads
directives added on the commandline using the--add-reads
switch, as an ordered set of strings in the format<source-module>=<target-module>
, in the order they were listed on the commandline.
-
-
Constructor Detail
-
ModulePathInfo
public ModulePathInfo()
Construct aModulePathInfo
.
-
-