Package io.github.classgraph
Class ModulePathInfo
- java.lang.Object
-
- io.github.classgraph.ModulePathInfo
-
public class ModulePathInfo extends java.lang.ObjectInformation 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>addExportsThe moduleexportsdirectives added on the commandline using the--add-exportsswitch, 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>addModulesThe modules added to the module path on the commandline using the--add-modulesswitch, as an ordered set of module names, in the order they were listed on the commandline.java.util.Set<java.lang.String>addOpensThe moduleopensdirectives added on the commandline using the--add-opensswitch, 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>addReadsThe modulereadsdirectives added on the commandline using the--add-readsswitch, as an ordered set of strings in the format<source-module>=<target-module>, in the order they were listed on the commandline.private static java.util.List<java.lang.Character>argPartSeparatorCharsThe module path commandline switch value delimiters.private static java.util.List<java.lang.String>argSwitchesThe module path commandline switches.private java.util.List<java.util.Set<java.lang.String>>fieldsThe fields.private java.util.concurrent.atomic.AtomicBooleangotRuntimeInfoSet to true once#getRuntimeInfo()is called.java.util.Set<java.lang.String>modulePathThe module path provided on the commandline by the--module-pathor-pswitch, as an ordered set of module names, in the order they were listed on the commandline.java.util.Set<java.lang.String>patchModulesThe module patch directives listed on the commandline using the--patch-moduleswitch, 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()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidgetRuntimeInfo(ReflectionUtils reflectionUtils)Fill in module info from VM commandline parameters.java.lang.StringtoString()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-pathor-pswitch, 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-modulesswitch, 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-moduleswitch, 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 moduleexportsdirectives added on the commandline using the--add-exportsswitch, 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 thisModulePathInfoobject was obtained fromScanResult.getModulePathInfo()rather thanClassGraph.getModulePathInfo(), any additionalAdd-Exportsentries 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 moduleopensdirectives added on the commandline using the--add-opensswitch, 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 thisModulePathInfoobject was obtained fromScanResult.getModulePathInfo()rather thanClassGraph.getModulePathInfo(), any additionalAdd-Opensentries 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 modulereadsdirectives added on the commandline using the--add-readsswitch, as an ordered set of strings in the format<source-module>=<target-module>, in the order they were listed on the commandline.
-
fields
private final java.util.List<java.util.Set<java.lang.String>> fields
The fields.
-
argSwitches
private static final java.util.List<java.lang.String> argSwitches
The module path commandline switches.
-
argPartSeparatorChars
private static final java.util.List<java.lang.Character> argPartSeparatorChars
The module path commandline switch value delimiters.
-
gotRuntimeInfo
private final java.util.concurrent.atomic.AtomicBoolean gotRuntimeInfo
Set to true once#getRuntimeInfo()is called.
-
-
Method Detail
-
getRuntimeInfo
void getRuntimeInfo(ReflectionUtils reflectionUtils)
Fill in module info from VM commandline parameters.
-
toString
public java.lang.String toString()
Return the module path info in commandline format.- Overrides:
toStringin classjava.lang.Object- Returns:
- the module path commandline string.
-
-