Interface FileSystem.Classpath
- All Superinterfaces:
IModulePathEntry
- All Known Implementing Classes:
ClasspathDirectory
,ClasspathJar
,ClasspathJep247
,ClasspathJep247Jdk12
,ClasspathJmod
,ClasspathJrt
,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.-
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptModule(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)
getModuleNames(Collection<String> limitModules)
getModuleNames(Collection<String> limitModules, Function<String,IModule> getModule)
getPath()
Return the path for file based classpath entries.boolean
hasAnnotationFileFor(String qualifiedTypeName)
Can the current location provide an external annotation file for the given type?default boolean
hasCUDeclaringPackage(String qualifiedPackageName, Function<CompilationUnit,String> pkgNameExtractor)
default boolean
void
Initialize the entryboolean
char[]
Return a normalized path for file based classpath entries.void
reset()
This method resets the environment.Methods inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.env.IModulePathEntry
getModule, getModule, getModulesDeclaringPackage, hasCompilationUnit, isAutomaticModule, listPackages, servesModule
-
Method Details
-
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
Initialize the entry- Throws:
IOException
-
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.- Parameters:
module
-
-
getDestinationPath
String getDestinationPath() -
getModuleNames
-
getModuleNames
Collection<String> getModuleNames(Collection<String> limitModules, Function<String,IModule> getModule)
-