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

pack-priv Class Module

extends Archive
Class Inheritance
Known Direct Subclasses
com.sun.tools.jdeps.Module.UnnamedModule, com.sun.tools.jdeps.Module.NormalModule, com.sun.tools.jdeps.ModuleExportsAnalyzer.RootModule, com.sun.tools.jdeps.Analyzer.Jdk8Internals
Imports
java.lang.module.ModuleDescriptor, java.net.URI, java.util.Collections, .HashMap, .HashSet, .Map, .Set

Jdeps internal representation of module for dependency analysis.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
private static class
Module.NormalModule

A normal module has a module-info.class

private static class

Field Summary

Modifier and TypeField and Description
pack-priv static final boolean
private final ModuleDescriptor
private final Map<String, Set<String>>
private final boolean
pack-priv static final String
private final URI
private final Map<String, Set<String>>
pack-priv static final Module
Inherited from com.sun.tools.jdeps.Archive:
deps

Constructor Summary

AccessConstructor and Description
protected
Module(String name)

protected
Module(String name, ModuleDescriptor descriptor, boolean isSystem)

private
Module(String name, URI location, ModuleDescriptor descriptor, Map<String, Set<String>> exports, Map<String, Set<String>> opens, boolean isSystem, ClassFileReader reader)

Method Summary

Modifier and TypeMethod and Description
public ModuleDescriptor
public Map<String, Set<String>>
public Module
public boolean
public boolean
isExported(String pn)

Tests if the package of the given name is exported.

public boolean
isExported(String pn, String target)

Tests if the package of the given name is exported to the target in a qualified fashion.

public boolean
public boolean
public boolean
public boolean
isOpen(String pn)

Tests if the package of the given name is open.

public boolean
isOpen(String pn, String target)

Tests if the package of the given name is open to the target in a qualified fashion.

public boolean
public URI
public String
name()

Returns module name

public Set<String>
public Module
toNormalModule(Map<String, Boolean> requires)

Converts this module to a normal module with the given dependences

public String
toString()

Overrides com.sun.tools.jdeps.Archive.toString.

Returns a string representation of the object.

pack-priv static void
trace(String fmt, Object... args)

pack-priv static void
trace(boolean traceOn, String fmt, Object... args)

Inherited from com.sun.tools.jdeps.Archive:
addClassaddClassclosecontainsequalsgetClassesgetDependenciesgetInstancegetNamegetPathNamehasDependenceshashCodeisEmptyisSameLocationpathreadervisitDependences

Field Detail

DEBUGback to summary
pack-priv static final boolean DEBUG
descriptorback to summary
private final ModuleDescriptor descriptor
exportsback to summary
private final Map<String, Set<String>> exports
isSystemback to summary
private final boolean isSystem
JDK_UNSUPPORTEDback to summary
pack-priv static final String JDK_UNSUPPORTED
locationback to summary
private final URI location

Hides com.sun.tools.jdeps.Archive.location.

opensback to summary
private final Map<String, Set<String>> opens
UNNAMED_MODULEback to summary
pack-priv static final Module UNNAMED_MODULE

Constructor Detail

Moduleback to summary
protected Module(String name)
Moduleback to summary
protected Module(String name, ModuleDescriptor descriptor, boolean isSystem)
Moduleback to summary
private Module(String name, URI location, ModuleDescriptor descriptor, Map<String, Set<String>> exports, Map<String, Set<String>> opens, boolean isSystem, ClassFileReader reader)

Method Detail

descriptorback to summary
public ModuleDescriptor descriptor()
exportsback to summary
public Map<String, Set<String>> exports()
getModuleback to summary
public Module getModule()

Overrides com.sun.tools.jdeps.Archive.getModule.

isAutomaticback to summary
public boolean isAutomatic()
isExportedback to summary
public boolean isExported(String pn)

Tests if the package of the given name is exported.

isExportedback to summary
public boolean isExported(String pn, String target)

Tests if the package of the given name is exported to the target in a qualified fashion.

isJDKback to summary
public boolean isJDK()
isJDKUnsupportedback to summary
public boolean isJDKUnsupported()
isNamedback to summary
public boolean isNamed()
isOpenback to summary
public boolean isOpen(String pn)

Tests if the package of the given name is open.

isOpenback to summary
public boolean isOpen(String pn, String target)

Tests if the package of the given name is open to the target in a qualified fashion.

isSystemback to summary
public boolean isSystem()
locationback to summary
public URI location()
nameback to summary
public String name()

Returns module name

packagesback to summary
public Set<String> packages()
toNormalModuleback to summary
public Module toNormalModule(Map<String, Boolean> requires)

Converts this module to a normal module with the given dependences

Exceptions
IllegalArgumentException:
if this module is not an automatic module
toStringback to summary
public String toString()

Overrides com.sun.tools.jdeps.Archive.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
traceback to summary
pack-priv static void trace(String fmt, Object... args)
traceback to summary
pack-priv static void trace(boolean traceOn, String fmt, Object... args)
com.sun.tools.jdeps back to summary

public final Class Module.Builder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final ModuleDescriptor
pack-priv final boolean
pack-priv URI
pack-priv final String
pack-priv ClassFileReader

Constructor Summary

AccessConstructor and Description
public
public
Builder(ModuleDescriptor md, boolean isSystem)

Method Summary

Modifier and TypeMethod and Description
public Module
public Module.Builder
public Module.Builder
location(URI location)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

descriptorback to summary
pack-priv final ModuleDescriptor descriptor
isSystemback to summary
pack-priv final boolean isSystem
locationback to summary
pack-priv URI location
nameback to summary
pack-priv final String name
readerback to summary
pack-priv ClassFileReader reader

Constructor Detail

Builderback to summary
public Builder(ModuleDescriptor md)
Builderback to summary
public Builder(ModuleDescriptor md, boolean isSystem)

Method Detail

buildback to summary
public Module build()
classesback to summary
public Module.Builder classes(ClassFileReader reader)
locationback to summary
public Module.Builder location(URI location)
com.sun.tools.jdeps back to summary

private Class Module.NormalModule

extends Module
Class Inheritance

A normal module has a module-info.class

Field Summary

Modifier and TypeField and Description
private final ModuleDescriptor
Inherited from com.sun.tools.jdeps.Module:
DEBUGJDK_UNSUPPORTEDUNNAMED_MODULE

Constructor Summary

AccessConstructor and Description
private
NormalModule(Module m, Map<String, Boolean> requires)

Converts the given automatic module to a normal module.

Method Summary

Modifier and TypeMethod and Description
public ModuleDescriptor
Inherited from com.sun.tools.jdeps.Module:
exportsgetModuleisAutomaticisExportedisExportedisJDKisJDKUnsupportedisNamedisOpenisOpenisSystemlocationnamepackagestoNormalModuletoStringtracetrace

Field Detail

mdback to summary
private final ModuleDescriptor md

Constructor Detail

NormalModuleback to summary
private NormalModule(Module m, Map<String, Boolean> requires)

Converts the given automatic module to a normal module. Replace this module's dependences with the given requires and also declare service providers, if specified in META-INF/services configuration file

Method Detail

descriptorback to summary
public ModuleDescriptor descriptor()

Overrides com.sun.tools.jdeps.Module.descriptor.

Annotations
@Override
com.sun.tools.jdeps back to summary

private Class Module.UnnamedModule

extends Module
Class Inheritance

Field Summary

Inherited from com.sun.tools.jdeps.Module:
DEBUGJDK_UNSUPPORTEDUNNAMED_MODULE

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
isExported(String pn)

Overrides com.sun.tools.jdeps.Module.isExported.

Tests if the package of the given name is exported.

public String
name()

Overrides com.sun.tools.jdeps.Module.name.

Returns module name

Inherited from com.sun.tools.jdeps.Module:
descriptorexportsgetModuleisAutomaticisExportedisJDKisJDKUnsupportedisNamedisOpenisOpenisSystemlocationpackagestoNormalModuletoStringtracetrace

Constructor Detail

UnnamedModuleback to summary
private UnnamedModule()

Method Detail

isExportedback to summary
public boolean isExported(String pn)

Overrides com.sun.tools.jdeps.Module.isExported.

Doc from com.sun.tools.jdeps.Module.isExported.

Tests if the package of the given name is exported.

Annotations
@Override
nameback to summary
public String name()

Overrides com.sun.tools.jdeps.Module.name.

Doc from com.sun.tools.jdeps.Module.name.

Returns module name

Annotations
@Override