Class ClasspathJrt
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.builder.ClasspathLocation
org.aspectj.org.eclipse.jdt.internal.core.builder.ClasspathJrt
- All Implemented Interfaces:
IModulePathEntry, IMultiModuleEntry
- Direct Known Subclasses:
ClasspathJrtWithReleaseOption
-
Field Summary
FieldsFields inherited from class ClasspathLocation
accessRuleSet, annotationZipFile, externalAnnotationPath, limitModuleNames, module, patchModuleName, updatesModifier and TypeFieldDescriptionprotected AccessRuleSetprotected ZipFileprotected Stringprotected IModuleprotected Stringprotected IUpdatableModule.UpdatesByKind -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClasspathJrt(String zipFilename) ClasspathJrt(String zipFilename, AccessRuleSet accessRuleSet, org.eclipse.core.runtime.IPath externalAnnotationPath) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddRequired(String mod, Set<String> allModules) voidcleanup()booleanfindClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName, boolean asBinaryOnly, Predicate<String> moduleNameFilter) findClass(String typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName) findClass(String binaryFileName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName, boolean asBinaryOnly, Predicate<String> moduleNameFilter) protected StringgetKey()getModule(char[] moduleName) Get the module named name that this entry contributes to the module pathgetModuleNames(Collection<String> limitModules) Get the names of all modules served by this entry.char[][]getModulesDeclaringPackage(String qualifiedPackageName, String moduleName) Answer the relevant modules that declare the given package.org.eclipse.core.runtime.IPathprotected StringbooleanhasCompilationUnit(String qualifiedPackageName, String moduleName) Answer whether the given package has any compilation unit (.java or .class) in the given module.inthashCode()booleanbooleanstatic voidloadModules(ClasspathJrt jrt) static voidTEST ONLYprotected Collection<String> selectModules(Set<String> keySet, Collection<String> limitModules) toString()Methods inherited from class ClasspathLocation
areAllModuleOptionsEqual, connectAllLocationsForEEA, createAnswer, decorateWithExternalAnnotations, externalAnnotationsEquals, forBinaryFolder, forJrtSystem, forLibrary, forLibrary, forLibrary, getModule, isOutputFolder, listPackages, reset, setModule, singletonModuleNameIfModifier and TypeMethodDescriptionprotected booleanvoidconnectAllLocationsForEEA(Collection<ClasspathLocation> allLocations, boolean add) protected NameEnvironmentAnswercreateAnswer(String fileNameWithoutExtension, IBinaryType reader, char[] moduleName) protected IBinaryTypedecorateWithExternalAnnotations(IBinaryType reader, String fileNameWithoutExtension) Search within this classpath location for an .eea file describing the given binary type.booleanNOTE: this method is intended for TESTS onlystatic ClasspathLocationforBinaryFolder(org.eclipse.core.resources.IContainer binaryFolder, boolean isOutputFolder, AccessRuleSet accessRuleSet, org.eclipse.core.runtime.IPath externalAnnotationPath, boolean autoModule) static ClasspathJrtforJrtSystem(String jrtPath, AccessRuleSet accessRuleSet, org.eclipse.core.runtime.IPath annotationsPath, String release) static ClasspathLocationforLibrary(String libraryPathname, AccessRuleSet accessRuleSet, org.eclipse.core.runtime.IPath annotationsPath, boolean isOnModulePath, String compliance) static ClasspathLocationforLibrary(ZipFile zipFile, AccessRuleSet accessRuleSet, boolean isOnModulePath, String compliance) static ClasspathLocationforLibrary(org.eclipse.core.resources.IFile library, AccessRuleSet accessRuleSet, org.eclipse.core.runtime.IPath annotationsPath, boolean isOnModulePath, String compliance) booleanchar[][]voidreset()voidchar[][]singletonModuleNameIf(boolean condition) Methods inherited from interface IModulePathEntry
getModule, isAutomaticModule, listPackages, servesModuleModifier and TypeMethodDescriptiondefault IModuleGet the module that this entry contributes.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
-
Field Details
-
modulesCache
-
zipFilename
-
jrtFileSystem
-
-
Constructor Details
-
ClasspathJrt
-
ClasspathJrt
public ClasspathJrt(String zipFilename, AccessRuleSet accessRuleSet, org.eclipse.core.runtime.IPath externalAnnotationPath)
-
-
Method Details
-
loadModules
-
getKey
-
cleanup
public void cleanup()- Overrides:
cleanupin classClasspathLocation
-
equals
-
findClass
public NameEnvironmentAnswer findClass(String binaryFileName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName, boolean asBinaryOnly, Predicate<String> moduleNameFilter) - Specified by:
findClassin classClasspathLocation
-
getProjectRelativePath
public org.eclipse.core.runtime.IPath getProjectRelativePath()- Specified by:
getProjectRelativePathin classClasspathLocation
-
hashCode
-
getModulesDeclaringPackage
Description copied from interface:IModulePathEntryAnswer 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.- Specified by:
getModulesDeclaringPackagein interfaceIModulePathEntry- Overrides:
getModulesDeclaringPackagein classClasspathLocation
-
hasCompilationUnit
Description copied from interface:IModulePathEntryAnswer 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.- Specified by:
hasCompilationUnitin interfaceIModulePathEntry- Specified by:
hasCompilationUnitin classClasspathLocation- Parameters:
qualifiedPackageName- '/'-separated package namemoduleName- if non-null only CUs attached to the given module should be considered- Returns:
- true iff a .java or .class file could be found in the given module / package.
-
isPackage
- Specified by:
isPackagein classClasspathLocation
-
toString
-
debugPathString
- Specified by:
debugPathStringin classClasspathLocation
-
findClass
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName, boolean asBinaryOnly, Predicate<String> moduleNameFilter) - Overrides:
findClassin classClasspathLocation
-
hasModule
public boolean hasModule()- Overrides:
hasModulein classClasspathLocation
-
getModule
Description copied from interface:IMultiModuleEntryGet the module named name that this entry contributes to the module path- Specified by:
getModulein interfaceIModulePathEntry- Specified by:
getModulein interfaceIMultiModuleEntry- Parameters:
moduleName- - The name of the module to look up- Returns:
- The module named name or null
-
getModule
-
getModuleNames
Description copied from interface:IMultiModuleEntryGet the names of all modules served by this entry.- Specified by:
getModuleNamesin interfaceIMultiModuleEntry- Parameters:
limitModules- if non-null, only modules with names in this set and their transitive closure will be reported.
-
selectModules
-
getReleaseVersion
-
addRequired
-
findClass
public NameEnvironmentAnswer findClass(String typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName) - Specified by:
findClassin classClasspathLocation
-
resetCaches
public static void resetCaches()TEST ONLY
-