APIdia Launch Partner
Top Inners Fields Constructors Methods
com.sun.tools.jdeps

public Class JdepsConfiguration

extends Object
implements AutoCloseable
Class Inheritance
All Implemented Interfaces
java.lang.AutoCloseable
Static Imports
com.sun.tools.jdeps.Module.trace, java.util.stream.Collectors.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
public static final String
public static final String
public static final String
private final List<Archive>
private final ModuleFinder
private final List<Archive>
public static final String
private final Map<String, Module>
private final Map<String, Module>
private final Map<String, List<Archive>>
private final Set<Module>
private final JdepsConfiguration.SystemModuleFinder
private final Runtime.Version

Constructor Summary

AccessConstructor and Description
private
JdepsConfiguration(Configuration config, JdepsConfiguration.SystemModuleFinder systemModulePath, ModuleFinder finder, Set<String> roots, List<Path> classpaths, List<Archive> initialArchives, Runtime.Version version)

Method Summary

Modifier and TypeMethod and Description
private void
private void
public List<Archive>
public void
close()

Implements java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources.

public Optional<Archive>
findClass(Dependency.Location location)

Returns an optional archive containing the given Location

public Optional<Module>
public Optional<ModuleDescriptor>
public Map<String, Module>
getModules()

Returns the list of Modules that can be found in the specified module paths.

public Runtime.Version
public List<Archive>
public static boolean
public Configuration
resolve(Set<String> roots)

Returns Configuration with the given roots

public Set<Module>
public Map<String, Set<String>>
splitPackages()

Returns the list of packages that split between resolved module and unnamed module

public Module
private String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALL_DEFAULTback to summary
public static final String ALL_DEFAULT
ALL_MODULE_PATHback to summary
public static final String ALL_MODULE_PATH
ALL_SYSTEMback to summary
public static final String ALL_SYSTEM
classpathArchivesback to summary
private final List<Archive> classpathArchives
finderback to summary
private final ModuleFinder finder
initialArchivesback to summary
private final List<Archive> initialArchives
MODULE_INFOback to summary
public static final String MODULE_INFO
nameToModuleback to summary
private final Map<String, Module> nameToModule
packageToModuleback to summary
private final Map<String, Module> packageToModule
packageToUnnamedModuleback to summary
private final Map<String, List<Archive>> packageToUnnamedModule
rootModulesback to summary
private final Set<Module> rootModules
systemback to summary
private final JdepsConfiguration.SystemModuleFinder system
versionback to summary
private final Runtime.Version version

Constructor Detail

JdepsConfigurationback to summary
private JdepsConfiguration(Configuration config, JdepsConfiguration.SystemModuleFinder systemModulePath, ModuleFinder finder, Set<String> roots, List<Path> classpaths, List<Archive> initialArchives, Runtime.Version version) throws IOException

Method Detail

addModuleReferenceback to summary
private void addModuleReference(ModuleReference mref)
addPackagesInUnnamedModuleback to summary
private void addPackagesInUnnamedModule(Archive archive)
classPathArchivesback to summary
public List<Archive> classPathArchives()
closeback to summary
public void close() throws IOException

Implements java.lang.AutoCloseable.close.

Doc from java.lang.AutoCloseable.close.

Closes this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.

Annotations
@Override
findClassback to summary
public Optional<Archive> findClass(Dependency.Location location)

Returns an optional archive containing the given Location

findModuleback to summary
public Optional<Module> findModule(String name)
findModuleDescriptorback to summary
public Optional<ModuleDescriptor> findModuleDescriptor(String name)
getModulesback to summary
public Map<String, Module> getModules()

Returns the list of Modules that can be found in the specified module paths.

getVersionback to summary
public Runtime.Version getVersion()
initialArchivesback to summary
public List<Archive> initialArchives()
isTokenback to summary
public static boolean isToken(String name)
resolveback to summary
public Configuration resolve(Set<String> roots)

Returns Configuration with the given roots

rootModulesback to summary
public Set<Module> rootModules()
splitPackagesback to summary
public Map<String, Set<String>> splitPackages()

Returns the list of packages that split between resolved module and unnamed module

toModuleback to summary
public Module toModule(ModuleReference mref)
toPackageNameback to summary
private String toPackageName(String name)
com.sun.tools.jdeps back to summary

public Class JdepsConfiguration.Builder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv ModuleFinder
pack-priv final List<Path>
pack-priv final List<Archive>
pack-priv final List<Path>
pack-priv final Set<String>
pack-priv final JdepsConfiguration.SystemModuleFinder
pack-priv final Set<String>
pack-priv ModuleFinder
pack-priv Runtime.Version

Constructor Summary

AccessConstructor and Description
public
public
Builder(String javaHome)

Method Summary

Modifier and TypeMethod and Description
public JdepsConfiguration.Builder
addClassPath(String classPath)

public JdepsConfiguration.Builder
addmods(Set<String> addmods)

public JdepsConfiguration.Builder
addRoot(Path path)

public JdepsConfiguration.Builder
appModulePath(String modulePath)

public JdepsConfiguration
private static ModuleFinder
private List<Path>
public JdepsConfiguration.Builder
public JdepsConfiguration.Builder
upgradeModulePath(String upgradeModulePath)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

appModulePathback to summary
pack-priv ModuleFinder appModulePath
classPathsback to summary
pack-priv final List<Path> classPaths
initialArchivesback to summary
pack-priv final List<Archive> initialArchives
pathsback to summary
pack-priv final List<Path> paths
rootModulesback to summary
pack-priv final Set<String> rootModules
systemModulePathback to summary
pack-priv final JdepsConfiguration.SystemModuleFinder systemModulePath
tokensback to summary
pack-priv final Set<String> tokens
upgradeModulePathback to summary
pack-priv ModuleFinder upgradeModulePath
versionback to summary
pack-priv Runtime.Version version

Constructor Detail

Builderback to summary
public Builder()
Builderback to summary
public Builder(String javaHome) throws IOException

Method Detail

addClassPathback to summary
public JdepsConfiguration.Builder addClassPath(String classPath)
addmodsback to summary
public JdepsConfiguration.Builder addmods(Set<String> addmods)
addRootback to summary
public JdepsConfiguration.Builder addRoot(Path path)
appModulePathback to summary
public JdepsConfiguration.Builder appModulePath(String modulePath)
buildback to summary
public JdepsConfiguration build() throws IOException
createModulePathFinderback to summary
private static ModuleFinder createModulePathFinder(String mpaths)
getClassPathsback to summary
private List<Path> getClassPaths(String cpaths)
multiReleaseback to summary
public JdepsConfiguration.Builder multiRelease(Runtime.Version version)
upgradeModulePathback to summary
public JdepsConfiguration.Builder upgradeModulePath(String upgradeModulePath)
com.sun.tools.jdeps back to summary

pack-priv Class JdepsConfiguration.SystemModuleFinder

extends Object
implements ModuleFinder
Class Inheritance
All Implemented Interfaces
java.lang.module.ModuleFinder

Field Summary

Modifier and TypeField and Description
private final FileSystem
private static final String
private final Path
private final Map<String, ModuleReference>

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Set<String>
private ModuleDescriptor
public Optional<ModuleReference>
find(String mn)

Implements java.lang.module.ModuleFinder.find.

Finds a reference to a module of a given name.

public Set<ModuleReference>
findAll()

Implements java.lang.module.ModuleFinder.findAll.

Returns the set of all module references that this finder can locate.

public ClassFileReader
getClassReader(String modulename)

public Stream<String>
private ModuleReference
private Map<String, ModuleReference>
walk(Path root)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fileSystemback to summary
private final FileSystem fileSystem
JAVA_HOMEback to summary
private static final String JAVA_HOME
rootback to summary
private final Path root
systemModulesback to summary
private final Map<String, ModuleReference> systemModules

Constructor Detail

SystemModuleFinderback to summary
pack-priv SystemModuleFinder()
SystemModuleFinderback to summary
pack-priv SystemModuleFinder(String javaHome) throws IOException

Method Detail

defaultSystemRootsback to summary
public Set<String> defaultSystemRoots()
dropHashesback to summary
private ModuleDescriptor dropHashes(ModuleDescriptor md)
findback to summary
public Optional<ModuleReference> find(String mn)

Implements java.lang.module.ModuleFinder.find.

Doc from java.lang.module.ModuleFinder.find.

Finds a reference to a module of a given name.

A ModuleFinder provides a consistent view of the modules that it locates. If find is invoked several times to locate the same module (by name) then it will return the same result each time. If a module is located then it is guaranteed to be a member of the set of modules returned by the findAll method.

Annotations
@Override
findAllback to summary
public Set<ModuleReference> findAll()

Implements java.lang.module.ModuleFinder.findAll.

Doc from java.lang.module.ModuleFinder.findAll.

Returns the set of all module references that this finder can locate.

A ModuleFinder provides a consistent view of the modules that it locates. If findAll is invoked several times then it will return the same (equals) result each time. For each ModuleReference element in the returned set then it is guaranteed that find will locate the ModuleReference if invoked to find that module.

Annotations
@Override
getClassReaderback to summary
public ClassFileReader getClassReader(String modulename) throws IOException
moduleNamesback to summary
public Stream<String> moduleNames()
toModuleReferenceback to summary
private ModuleReference toModuleReference(Path path)
walkback to summary
private Map<String, ModuleReference> walk(Path root)