Class ClasspathLocation
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.batch.ClasspathLocation
- All Implemented Interfaces:
FileSystem.Classpath, IModulePathEntry, SuffixConstants
- Direct Known Subclasses:
ClasspathDirectory, ClasspathJar, ClasspathJrt, ClasspathJsr199
public abstract class ClasspathLocation
extends Object
implements FileSystem.Classpath, SuffixConstants
-
Nested Class Summary
Nested classes/interfaces inherited from interface FileSystem.Classpath
FileSystem.Classpath.PathKind -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AccessRuleSetstatic final intfinal Stringstatic final intFields inherited from interface SuffixConstants
EXTENSION_aj, EXTENSION_AJ, EXTENSION_class, EXTENSION_CLASS, EXTENSION_java, EXTENSION_JAVA, EXTENSION_jmod, EXTENSION_JMOD, SUFFIX_aj, SUFFIX_AJ, SUFFIX_class, SUFFIX_CLASS, SUFFIX_java, SUFFIX_JAVA, SUFFIX_STRING_aj, SUFFIX_STRING_AJ, SUFFIX_STRING_class, SUFFIX_STRING_CLASS, SUFFIX_STRING_java, SUFFIX_STRING_JAVAModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final char[]static final char[]static final char[]static final char[]static final char[]static final char[]static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClasspathLocation(AccessRuleSet accessRuleSet, String destinationPath) -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptModule(IModule mod) Accepts to represent a module location with the given module description.allModules(Iterable<T> allSystemModules, Function<T, String> getModuleName, Function<T, IModule> getModule) booleanprotected AccessRestrictionfetchAccessRestriction(String qualifiedBinaryFileName) Return the first access rule which is violated when accessing a given type, or null if no 'non accessible' access rule applies.intgetMode()getModuleNames(Collection<String> limitModules) getModuleNames(Collection<String> limitModules, Function<String, IModule> getModule) getPath()Return the path for file based classpath entries.inthashCode()booleanSpecifies whether this entry represents an automatic module.booleanvoidreset()This method resets the environment.protected Collection<String> selectModules(Set<String> modules, Collection<String> limitModules, Function<String, IModule> getModule) voidprotected char[][]singletonModuleNameIf(boolean condition) Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FileSystem.Classpath
fetchLinkedJars, findClass, findClass, findTypeNames, forbidsExportFrom, hasAnnotationFileFor, hasCUDeclaringPackage, hasModule, initialize, normalizedPathModifier and TypeMethodDescriptionfetchLinkedJars(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) 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 entrychar[]Return a normalized path for file based classpath entries.Methods inherited from interface IModulePathEntry
getModule, getModule, getModulesDeclaringPackage, hasCompilationUnit, 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 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
-
Field Details
-
SOURCE
public static final int SOURCE- See Also:
-
BINARY
public static final int BINARY- See Also:
-
accessRuleSet
-
destinationPath
-
-
Constructor Details
-
ClasspathLocation
-
-
Method Details
-
getPathKind
- Specified by:
getPathKindin interfaceFileSystem.Classpath
-
setPathKind
- Specified by:
setPathKindin interfaceFileSystem.Classpath
-
fetchAccessRestriction
Return the first access rule which is violated when accessing a given type, or null if no 'non accessible' access rule applies.- Parameters:
qualifiedBinaryFileName- tested type specification, formed as: "org/aspectj/org/eclipse/jdt/core/JavaCore.class"; on systems that use \ as File.separator, the "org\eclipse\jdt\core\JavaCore.class" is accepted as well- Returns:
- the first access rule which is violated when accessing a given type, or null if none applies
-
getMode
public int getMode() -
hashCode
-
equals
-
getPath
Description copied from interface:FileSystem.ClasspathReturn 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.- Specified by:
getPathin interfaceFileSystem.Classpath- Returns:
- the path for file based classpath entries
-
getDestinationPath
- Specified by:
getDestinationPathin interfaceFileSystem.Classpath
-
acceptModule
Description copied from interface:FileSystem.ClasspathAccepts to represent a module location with the given module description.- Specified by:
acceptModulein interfaceFileSystem.Classpath
-
isAutomaticModule
public boolean isAutomaticModule()Description copied from interface:IModulePathEntrySpecifies whether this entry represents an automatic module.- Specified by:
isAutomaticModulein interfaceIModulePathEntry- Returns:
- true if this is an automatic module, false otherwise
-
getModuleNames
- Specified by:
getModuleNamesin interfaceFileSystem.Classpath
-
getModuleNames
public Collection<String> getModuleNames(Collection<String> limitModules, Function<String, IModule> getModule) - Specified by:
getModuleNamesin interfaceFileSystem.Classpath
-
selectModules
protected Collection<String> selectModules(Set<String> modules, Collection<String> limitModules, Function<String, IModule> getModule) -
allModules
-
isPackage
- Specified by:
isPackagein interfaceFileSystem.Classpath
-
singletonModuleNameIf
protected char[][] singletonModuleNameIf(boolean condition) -
reset
public void reset()Description copied from interface:FileSystem.ClasspathThis method resets the environment. The resulting state is equivalent to a new name environment without creating a new object.- Specified by:
resetin interfaceFileSystem.Classpath
-