Schnittstelle IModulePathEntry
- Alle bekannten Unterschnittstellen:
FileSystem.Classpath
,IMultiModuleEntry
- Alle bekannten Implementierungsklassen:
ClasspathDirectory
,ClasspathJar
,ClasspathJep247
,ClasspathJep247Jdk12
,ClasspathJmod
,ClasspathJrt
,ClasspathJrt
,ClasspathJrtWithReleaseOption
,ClasspathJsr199
,ClasspathLocation
,ClasspathMultiReleaseJar
,ClasspathSourceDirectory
,ClasspathSourceJar
,JrtPackageFragmentRoot
,ModulePathEntry
,ModulePathEntry.Multi
,ProjectEntry
public interface IModulePathEntry
Represents an entry on the module path of a project. Could be a single module or a collection of
modules (like a jimage or an exploded module directory structure)
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdefault IModule
Get the module that this entry contributes.default IModule
getModule
(char[] name) Get the module named name from this entry.char[][]
getModulesDeclaringPackage
(String qualifiedPackageName, String moduleName) Answer the relevant modules that declare the given package.boolean
hasCompilationUnit
(String qualifiedPackageName, String moduleName) Answer whether the given package has any compilation unit (.java or .class) in the given module.default boolean
Specifies whether this entry represents an automatic module.default char[][]
Lists all packages in this modulepath entry.default boolean
servesModule
(char[] name) Indicates whether this entry knows the module named name and can answer queries regarding the module
-
Methodendetails
-
getModule
Get the module that this entry contributes. May be null, for instance when this entry does not represent a single module- Gibt zurück:
- The module that this entry contributes or null
-
getModule
Get the module named name from this entry. May be null- Parameter:
name
- - The name of the module to look up- Gibt zurück:
- The module named name or null
-
servesModule
default boolean servesModule(char[] name) Indicates whether this entry knows the module named name and can answer queries regarding the module- Parameter:
name
- The name of the module- Gibt zurück:
- True if this entry knows the module, false otherwise
-
getModulesDeclaringPackage
Answer the relevant modules that declare the given package. If moduleName is ModuleBinding.ANY then all packages are relevant, if moduleName is ModuleBinding.UNNAMED, then only packages in the unnamed module are relevant, otherwise consider only packages in the module identified by moduleName. -
hasCompilationUnit
Answer whether the given package has any compilation unit (.java or .class) in the given module. For entries representing a single module, the module name should be checked before invoking this method.- Parameter:
qualifiedPackageName
- '/'-separated package namemoduleName
- if non-null only CUs attached to the given module should be considered- Gibt zurück:
- true iff a .java or .class file could be found in the given module / package.
-
listPackages
default char[][] listPackages()Lists all packages in this modulepath entry.- Gibt zurück:
- array of flat, dot-separated package names
-
isAutomaticModule
default boolean isAutomaticModule()Specifies whether this entry represents an automatic module.- Gibt zurück:
- true if this is an automatic module, false otherwise
-