static ClasspathLocation forLibrary(IFile library, AccessRuleSet accessRuleSet) { return new ClasspathJar(library, accessRuleSet); }
static ClasspathLocation forLibrary(IFile library, AccessRuleSet accessRuleSet, IPath annotationsPath, boolean autoModule) { return new ClasspathJar(library, accessRuleSet, annotationsPath, autoModule); }
static ClasspathLocation forLibrary(IFile library, AccessRuleSet accessRuleSet) { return new ClasspathJar(library, accessRuleSet); }
static ClasspathLocation forLibrary(IFile library, AccessRuleSet accessRuleSet) { return new ClasspathJar(library, accessRuleSet); }
static ClasspathLocation forLibrary(String libraryPathname, long lastModified, AccessRuleSet accessRuleSet) { return new ClasspathJar(libraryPathname, lastModified, accessRuleSet); }
static ClasspathLocation forLibrary(String libraryPathname, long lastModified, AccessRuleSet accessRuleSet, IPath annotationsPath) { return new ClasspathJar(libraryPathname, lastModified, accessRuleSet, annotationsPath); }
static ClasspathLocation forLibrary(String libraryPathname, long lastModified, AccessRuleSet accessRuleSet) { return new ClasspathJar(libraryPathname, lastModified, accessRuleSet); }
static ClasspathLocation forLibrary(IFile library, AccessRuleSet accessRuleSet, IPath annotationsPath) { return new ClasspathJar(library, accessRuleSet, annotationsPath); }
static ClasspathLocation forLibrary(String libraryPathname, long lastModified, AccessRuleSet accessRuleSet) { return new ClasspathJar(libraryPathname, lastModified, accessRuleSet); }
public static ClasspathLocation forLibrary(ZipFile zipFile, AccessRuleSet accessRuleSet, IPath externalAnnotationPath, boolean isOnModulePath, String compliance) { return (CompilerOptions.versionToJdkLevel(compliance) < ClassFileConstants.JDK9) ? new ClasspathJar(zipFile, accessRuleSet, externalAnnotationPath, isOnModulePath) : new ClasspathMultiReleaseJar(zipFile, accessRuleSet, externalAnnotationPath, isOnModulePath, compliance); }
static ClasspathLocation forLibrary(IFile library, AccessRuleSet accessRuleSet, IPath annotationsPath, boolean autoModule, String compliance) { return (CompilerOptions.versionToJdkLevel(compliance) < ClassFileConstants.JDK9) ? new ClasspathJar(library, accessRuleSet, annotationsPath, autoModule) : new ClasspathMultiReleaseJar(library, accessRuleSet, annotationsPath, autoModule, compliance); } public static ClasspathLocation forLibrary(ZipFile zipFile, AccessRuleSet accessRuleSet, IPath externalAnnotationPath, boolean isOnModulePath, String compliance) {
static ClasspathLocation forLibrary(String libraryPathname, long lastModified, AccessRuleSet accessRuleSet, IPath annotationsPath, boolean autoModule) { return Util.isJrt(libraryPathname) ? new ClasspathJrt(libraryPathname, annotationsPath) : Util.archiveFormat(libraryPathname) == Util.JMOD_FILE ? new ClasspathJMod(libraryPathname, lastModified, accessRuleSet, annotationsPath) : new ClasspathJar(libraryPathname, lastModified, accessRuleSet, annotationsPath, autoModule); }
static ClasspathLocation forLibrary(String libraryPathname, long lastModified, AccessRuleSet accessRuleSet, IPath annotationsPath, boolean autoModule, String compliance) { return Util.archiveFormat(libraryPathname) == Util.JMOD_FILE ? new ClasspathJMod(libraryPathname, lastModified, accessRuleSet, annotationsPath) : (compliance == null || (CompilerOptions.versionToJdkLevel(compliance) < ClassFileConstants.JDK9) ? new ClasspathJar(libraryPathname, lastModified, accessRuleSet, annotationsPath, autoModule) : new ClasspathMultiReleaseJar(libraryPathname, lastModified, accessRuleSet, annotationsPath, autoModule, compliance)); } static ClasspathJrt forJrtSystem(String jrtPath, AccessRuleSet accessRuleSet, IPath annotationsPath, String release) {
if (root.isArchive()) { ZipFile zipFile = manager.getZipFile(path); cpLocations[index++] = new ClasspathJar(zipFile, ((ClasspathEntry) root.getRawClasspathEntry()).getAccessRuleSet()); } else { Object target = JavaModel.getTarget(path, true);
if (root.isArchive()) { ZipFile zipFile = manager.getZipFile(path); cpLocations[index++] = new ClasspathJar(zipFile, ((ClasspathEntry) root.getRawClasspathEntry()).getAccessRuleSet()); } else { Object target = JavaModel.getTarget(path, true);
if (root.isArchive()) { ZipFile zipFile = manager.getZipFile(path); cpLocations[index++] = new ClasspathJar(zipFile, ((ClasspathEntry) root.getRawClasspathEntry()).getAccessRuleSet()); } else { Object target = JavaModel.getTarget(path, true);
new ClasspathJrt(path.toOSString(), ClasspathEntry.getExternalAnnotationPath(rawClasspathEntry, ((IJavaProject)root.getParent()).getProject(), true)) : new ClasspathJar(manager.getZipFile(path), rawClasspathEntry.getAccessRuleSet(), ClasspathEntry.getExternalAnnotationPath(rawClasspathEntry, ((IJavaProject) root.getParent()).getProject(), true),
private ClasspathLocation mapToClassPathLocation( JavaModelManager manager, PackageFragmentRoot root) { ClasspathLocation cp = null; IPath path = root.getPath(); try { if (root.isArchive()) { ClasspathEntry rawClasspathEntry = (ClasspathEntry) root.getRawClasspathEntry(); cp = new ClasspathJar(manager.getZipFile(path), rawClasspathEntry.getAccessRuleSet(), ClasspathEntry.getExternalAnnotationPath(rawClasspathEntry, ((IJavaProject)root.getParent()).getProject(), true)); } else { Object target = JavaModel.getTarget(path, true); if (target != null) { if (root.getKind() == IPackageFragmentRoot.K_SOURCE) { cp = new ClasspathSourceDirectory((IContainer)target, root.fullExclusionPatternChars(), root.fullInclusionPatternChars()); } else { ClasspathEntry rawClasspathEntry = (ClasspathEntry) root.getRawClasspathEntry(); cp = ClasspathLocation.forBinaryFolder((IContainer) target, false, rawClasspathEntry.getAccessRuleSet(), ClasspathEntry.getExternalAnnotationPath(rawClasspathEntry, ((IJavaProject)root.getParent()).getProject(), true)); } } } } catch (CoreException e1) { // problem opening zip file or getting root kind // consider root corrupt and ignore } return cp; }