Top Description Fields Constructors Methods
io.github.classgraph

public Class ModulePathInfo

extends Object
Class Inheritance
Imports
java.io.File, java.util.Arrays, .LinkedHashSet, .List, .Set, java.util.concurrent.atomic.AtomicBoolean, nonapi.io.github.classgraph.reflection.ReflectionUtils, nonapi.io.github.classgraph.utils.JarUtils, .StringUtils

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

Modifier and TypeField and Description
public final Set<String>
addExports

The module exports 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.

public final Set<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.

public final Set<String>
addOpens

The module opens 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.

public final Set<String>
addReads

The module reads 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.

private static final List<Character>
argPartSeparatorChars

The module path commandline switch value delimiters.

private static final List<String>
argSwitches

The module path commandline switches.

private final List<Set<String>>
fields

The fields.

private final AtomicBoolean
gotRuntimeInfo

Set to true once getRuntimeInfo() is called.

public final Set<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.

public final Set<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

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
getRuntimeInfo(final ReflectionUtils reflectionUtils)

Fill in module info from VM commandline parameters.

public String

Returns:

the module path commandline string.
toString
()

Overrides java.lang.Object.toString.

Return the module path info in commandline format.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

addExportsback to summary
public final Set<String> addExports

The module exports 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 this ModulePathInfo object was obtained from ScanResult#getModulePathInfo() rather than ClassGraph#getModulePathInfo(), any additional Add-Exports entries found in manifest files during classpath scanning will be appended to this list, in the format <source-module>/<package>=ALL-UNNAMED.

addModulesback to summary
public final Set<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 include ALL-DEFAULT, ALL-SYSTEM, and ALL-MODULE-PATH (see JEP 261 for info).

addOpensback to summary
public final Set<String> addOpens

The module opens 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 this ModulePathInfo object was obtained from ScanResult#getModulePathInfo() rather than ClassGraph#getModulePathInfo(), any additional Add-Opens entries found in manifest files during classpath scanning will be appended to this list, in the format <source-module>/<package>=ALL-UNNAMED.

addReadsback to summary
public final Set<String> addReads

The module reads 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.

argPartSeparatorCharsback to summary
private static final List<Character> argPartSeparatorChars

The module path commandline switch value delimiters.

argSwitchesback to summary
private static final List<String> argSwitches

The module path commandline switches.

fieldsback to summary
private final List<Set<String>> fields

The fields.

gotRuntimeInfoback to summary
private final AtomicBoolean gotRuntimeInfo

Set to true once getRuntimeInfo() is called.

modulePathback to summary
public final Set<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() or ScanResult#getModules() to get all modules visible at runtime.

patchModulesback to summary
public final Set<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 Detail

ModulePathInfoback to summary
public ModulePathInfo()

Method Detail

getRuntimeInfoback to summary
pack-priv void getRuntimeInfo(final ReflectionUtils reflectionUtils)

Fill in module info from VM commandline parameters.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Return the module path info in commandline format.

Returns:String

the module path commandline string.

Annotations
@Override