Interface FileSystem.Classpath
- All Superinterfaces:
IModulePathEntry
- All Known Implementing Classes:
ClasspathDirectory, ClasspathJar, ClasspathJep247, ClasspathJep247Jdk12, ClasspathJmod, ClasspathJrt, ClasspathJsr199, ClasspathLocation, ClasspathMultiReleaseJar, ClasspathSourceJar
- Enclosing class:
FileSystem
A
Classpath, even though an IModuleLocation, can represent a plain
classpath location too. The FileSystem tells the Classpath whether to behave as a module or regular class
path via acceptModule(IModule).
Sub types of classpath are responsible for appropriate behavior based on this.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptModule(IModule module) Accepts to represent a module location with the given module description.fetchLinkedJars(FileSystem.ClasspathSectionProblemReporter problemReporter) Return a list of the jar file names defined in the Class-Path section of the jar file manifest if any, null else.findClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName) findClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName, boolean asBinaryOnly) char[][][]findTypeNames(String qualifiedPackageName, String moduleName) default booleanforbidsExportFrom(String modName) getModuleNames(Collection<String> limitModules) getModuleNames(Collection<String> limitModules, Function<String, IModule> getModule) getPath()Return the path for file based classpath entries.booleanhasAnnotationFileFor(String qualifiedTypeName) Can the current location provide an external annotation file for the given type?default booleanhasCUDeclaringPackage(String qualifiedPackageName, Function<CompilationUnit, String> pkgNameExtractor) default booleanvoidInitialize the entrybooleanchar[]Return a normalized path for file based classpath entries.voidreset()This method resets the environment.voidMethods inherited from interface IModulePathEntry
getModule, getModule, getModulesDeclaringPackage, hasCompilationUnit, isAutomaticModule, listPackages, servesModuleModifier and TypeMethodDescriptiondefault IModuleGet the module that this entry contributes.default IModulegetModule(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.booleanhasCompilationUnit(String qualifiedPackageName, String moduleName) Answer whether the given package has any compilation unit (.java or .class) in the given module.default booleanSpecifies whether this entry represents an automatic module.default char[][]Lists all packages in this modulepath entry.default booleanservesModule(char[] name) Indicates whether this entry knows the module named name and can answer queries regarding the module
-
Method Details
-
setPathKind
-
getPathKind
FileSystem.Classpath.PathKind getPathKind() -
findTypeNames
-
findClass
NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName) -
findClass
NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName, boolean asBinaryOnly) -
isPackage
-
hasModule
default boolean hasModule() -
hasCUDeclaringPackage
default boolean hasCUDeclaringPackage(String qualifiedPackageName, Function<CompilationUnit, String> pkgNameExtractor) -
fetchLinkedJars
List<FileSystem.Classpath> fetchLinkedJars(FileSystem.ClasspathSectionProblemReporter problemReporter) Return a list of the jar file names defined in the Class-Path section of the jar file manifest if any, null else. Only ClasspathJar (and extending classes) instances may return a non-null result.- Parameters:
problemReporter- problem reporter with which potential misconfiguration issues are raised- Returns:
- a list of the jar file names defined in the Class-Path section of the jar file manifest if any
-
reset
void reset()This method resets the environment. The resulting state is equivalent to a new name environment without creating a new object. -
normalizedPath
char[] normalizedPath()Return a normalized path for file based classpath entries. This is an absolute path in which file separators are transformed to the platform-agnostic '/', ending with a '/' for directories. This is an absolute path in which file separators are transformed to the platform-agnostic '/', deprived from the '.jar' (resp. '.zip') extension for jar (resp. zip) files.- Returns:
- a normalized path for file based classpath entries
-
getPath
String getPath()Return the path for file based classpath entries. This is an absolute path ending with a file separator for directories, an absolute path including the '.jar' (resp. '.zip') extension for jar (resp. zip) files.- Returns:
- the path for file based classpath entries
-
initialize
-
hasAnnotationFileFor
Can the current location provide an external annotation file for the given type?- Parameters:
qualifiedTypeName- type name in qualified /-separated notation.
-
acceptModule
Accepts to represent a module location with the given module description. -
getDestinationPath
String getDestinationPath() -
getModuleNames
-
getModuleNames
Collection<String> getModuleNames(Collection<String> limitModules, Function<String, IModule> getModule) -
forbidsExportFrom
-