@Override public boolean hasAbsolutePath() { return uri.hasAbsolutePath(); }
@Override public boolean hasAbsolutePath() { return internalUri.hasAbsolutePath(); }
@Override public boolean hasAbsolutePath() { return base.hasAbsolutePath(); }
Archive getClassPathArchive(String uri, List archives){ for (int i = 0; i < archives.size(); i++) { Archive anArchive = (Archive) archives.get(i); String archiveURIString = anArchive.getURI(); URI archiveURI = URI.createURI(archiveURIString); boolean hasAbsolutePath = archiveURI.hasAbsolutePath(); if( hasAbsolutePath ){ archiveURIString = archiveURI.lastSegment(); } if (archiveURIString.equals(uri)) return anArchive; } return null; }
protected Archive getArchive(String uri, List archives) { for (int i = 0; i < archives.size(); i++) { Archive anArchive = (Archive) archives.get(i); String archiveURIString = anArchive.getURI(); URI archiveURI = URI.createURI(archiveURIString); boolean hasAbsolutePath = archiveURI.hasAbsolutePath(); if( hasAbsolutePath ){ archiveURIString = archiveURI.lastSegment(); } if (archiveURIString.equals(uri)) return anArchive; } return null; }
public URI findResourceOnClasspath(ClassLoader classLoader, URI classpathUri) throws URISyntaxException { String pathAsString = classpathUri.path(); if (classpathUri.hasAbsolutePath()) { pathAsString = pathAsString.substring(1); } URL resource = classLoader.getResource(pathAsString); if (resource==null) throw new FileNotFoundOnClasspathException("Couldn't find resource on classpath. URI was '"+classpathUri+"'"); URI fileUri = URI.createURI(resource.toString(),true); return fileUri.appendFragment(classpathUri.fragment()); }
if (result.hasAbsolutePath()) if (result.hasAbsolutePath())
if (result.hasAbsolutePath()) if (result.hasAbsolutePath())
newAbsolutePath = base.hasAbsolutePath(); newSegments = base.rawSegments(); newQuery = base.query(); newAbsolutePath = base.hasAbsolutePath() || !hasEmptyPath(); newSegments = newAbsolutePath ? mergePath(base, preserveRootParents) : NO_SEGMENTS;
if (scheme != oldPrefix.scheme() || authority != oldPrefix.authority() || device != oldPrefix.device() || hasAbsolutePath() != oldPrefix.hasAbsolutePath()) return POOL.intern(false, URIPool.URIComponentsAccessUnit.VALIDATE_NONE, true, newPrefix.scheme(), newPrefix.authority(), newPrefix.device(), newPrefix.hasAbsolutePath(), mergedSegments, query);
protected ClasspathElement createElement(Archive referencingArchive, Archive referencedArchive, String cpEntry) { ClasspathElement element = new ClasspathElement(referencingArchive); element.setValid(true); String uriString = referencedArchive.getURI(); URI uri = URI.createURI(uriString); boolean hasAbsolutePath = uri.hasAbsolutePath(); if( hasAbsolutePath ){ uriString = uri.lastSegment(); } //element.setText(referencedArchive.getURI()); element.setText(uriString); element.setTargetArchive(referencedArchive); element.setEarProject(earProject); if( earComponent != null ){ IContainer earConentFolder = earComponent.getRootFolder().getUnderlyingFolder(); if( earConentFolder.getType() == IResource.FOLDER ){ element.setEarContentFolder( earConentFolder.getName()); }else { element.setEarContentFolder( "" ); } } setProjectValues(element, referencedArchive); if (cpEntry != null) element.setValuesSelected(cpEntry); setType(element, referencedArchive); return element; }