/** * This function computes the URL of the index location for this classpath entry. It returns null if the URL is * invalid. */ public URL getLibraryIndexLocation() { switch(getEntryKind()) { case IClasspathEntry.CPE_LIBRARY : case IClasspathEntry.CPE_VARIABLE : break; default : return null; } if (this.extraAttributes == null) return null; for (int i= 0; i < this.extraAttributes.length; i++) { IClasspathAttribute attrib= this.extraAttributes[i]; if (IClasspathAttribute.INDEX_LOCATION_ATTRIBUTE_NAME.equals(attrib.getName())) { String value = attrib.getValue(); try { return new URL(value); } catch (MalformedURLException e) { return null; } } } return null; }
/** * This function computes the URL of the index location for this classpath entry. It returns null if the URL is * invalid. */ public URL getLibraryIndexLocation() { switch(getEntryKind()) { case IClasspathEntry.CPE_LIBRARY : case IClasspathEntry.CPE_VARIABLE : break; default : return null; } if (this.extraAttributes == null) return null; for (int i= 0; i < this.extraAttributes.length; i++) { IClasspathAttribute attrib= this.extraAttributes[i]; if (IClasspathAttribute.INDEX_LOCATION_ATTRIBUTE_NAME.equals(attrib.getName())) { String value = attrib.getValue(); try { return new URL(value); } catch (MalformedURLException e) { return null; } } } return null; }
/** * This function computes the URL of the index location for this classpath entry. It returns null if the URL is * invalid. */ public URL getLibraryIndexLocation() { switch(getEntryKind()) { case IClasspathEntry.CPE_LIBRARY : case IClasspathEntry.CPE_VARIABLE : break; default : return null; } if (this.extraAttributes == null) return null; for (int i= 0; i < this.extraAttributes.length; i++) { IClasspathAttribute attrib= this.extraAttributes[i]; if (IClasspathAttribute.INDEX_LOCATION_ATTRIBUTE_NAME.equals(attrib.getName())) { String value = attrib.getValue(); try { return new URL(value); } catch (MalformedURLException e) { return null; } } } return null; }
/** * This function computes the URL of the index location for this classpath entry. It returns null if the URL is * invalid. */ public URL getLibraryIndexLocation() { switch(getEntryKind()) { case IClasspathEntry.CPE_LIBRARY : case IClasspathEntry.CPE_VARIABLE : break; default : return null; } if (this.extraAttributes == null) return null; for (int i= 0; i < this.extraAttributes.length; i++) { IClasspathAttribute attrib= this.extraAttributes[i]; if (IClasspathAttribute.INDEX_LOCATION_ATTRIBUTE_NAME.equals(attrib.getName())) { String value = attrib.getValue(); try { return new URL(value); } catch (MalformedURLException e) { return null; } } } return null; }
public ClasspathEntry withExtraAttributeRemoved(String attrName) { IClasspathAttribute[] changedAttributes = Arrays.stream(this.getExtraAttributes()) .filter(a -> !a.getName().equals(attrName)).toArray(IClasspathAttribute[]::new); return new ClasspathEntry( this.getContentKind(), this.getEntryKind(), this.getPath(), this.getInclusionPatterns(), this.getExclusionPatterns(), this.getSourceAttachmentPath(), this.getSourceAttachmentRootPath(), this.getOutputLocation(), this.getReferencingEntry(), this.isExported(), this.getAccessRules(), this.combineAccessRules(), changedAttributes); }
public ClasspathEntry[] resolvedChainedLibraries() { IPath[] paths = resolvedChainedLibraries(getPath()); int length = paths.length; if (length == 0) return NO_ENTRIES; ClasspathEntry[] result = new ClasspathEntry[length]; for (int i = 0; i < length; i++) { // Chained(referenced) libraries can have their own attachment path. Hence, set them to null result[i] = new ClasspathEntry( getContentKind(), getEntryKind(), paths[i], this.inclusionPatterns, this.exclusionPatterns, null, null, getOutputLocation(), this, this.isExported, getAccessRules(), this.combineAccessRules, NO_EXTRA_ATTRIBUTES); } return result; }
public ClasspathEntry[] resolvedChainedLibraries() { IPath[] paths = resolvedChainedLibraries(getPath()); int length = paths.length; if (length == 0) return NO_ENTRIES; ClasspathEntry[] result = new ClasspathEntry[length]; for (int i = 0; i < length; i++) { // Chained(referenced) libraries can have their own attachment path. Hence, set them to null result[i] = new ClasspathEntry( getContentKind(), getEntryKind(), paths[i], this.inclusionPatterns, this.exclusionPatterns, null, null, getOutputLocation(), this, this.isExported, getAccessRules(), this.combineAccessRules, NO_EXTRA_ATTRIBUTES); } return result; }
public ClasspathEntry[] resolvedChainedLibraries() { IPath[] paths = resolvedChainedLibraries(getPath()); int length = paths.length; if (length == 0) return NO_ENTRIES; ClasspathEntry[] result = new ClasspathEntry[length]; for (int i = 0; i < length; i++) { // Chained(referenced) libraries can have their own attachment path. Hence, set them to null result[i] = new ClasspathEntry( getContentKind(), getEntryKind(), paths[i], this.inclusionPatterns, this.exclusionPatterns, null, null, getOutputLocation(), this, this.isExported, getAccessRules(), this.combineAccessRules, NO_EXTRA_ATTRIBUTES); } return result; }
public ClasspathEntry[] resolvedChainedLibraries() { IPath[] paths = resolvedChainedLibraries(getPath()); int length = paths.length; if (length == 0) return NO_ENTRIES; ClasspathEntry[] result = new ClasspathEntry[length]; for (int i = 0; i < length; i++) { // Chained(referenced) libraries can have their own attachment path. Hence, set them to null result[i] = new ClasspathEntry( getContentKind(), getEntryKind(), paths[i], this.inclusionPatterns, this.exclusionPatterns, null, null, getOutputLocation(), this, this.isExported, getAccessRules(), this.combineAccessRules, NO_EXTRA_ATTRIBUTES); } return result; }
public ClasspathEntry[] resolvedChainedLibraries() { IPath[] paths = resolvedChainedLibraries(getPath()); int length = paths.length; if (length == 0) return NO_ENTRIES; ClasspathEntry[] result = new ClasspathEntry[length]; for (int i = 0; i < length; i++) { // Chained(referenced) libraries can have their own attachment path. Hence, set them to null result[i] = new ClasspathEntry( getContentKind(), getEntryKind(), paths[i], this.inclusionPatterns, this.exclusionPatterns, null, null, getOutputLocation(), this, this.isExported, getAccessRules(), this.combineAccessRules, NO_EXTRA_ATTRIBUTES); } return result; }
public ClasspathEntry[] resolvedChainedLibraries() { IPath[] paths = resolvedChainedLibraries(getPath()); int length = paths.length; if (length == 0) return NO_ENTRIES; ClasspathEntry[] result = new ClasspathEntry[length]; for (int i = 0; i < length; i++) { // Chained(referenced) libraries can have their own attachment path. Hence, set them to null result[i] = new ClasspathEntry( getContentKind(), getEntryKind(), paths[i], this.inclusionPatterns, this.exclusionPatterns, null, null, getOutputLocation(), this, this.isExported, getAccessRules(), this.combineAccessRules, NO_EXTRA_ATTRIBUTES); } return result; }
public ClasspathEntry resolvedDotDot(IPath reference) { IPath resolvedPath = resolveDotDot(reference, this.path); if (resolvedPath == this.path) return this; return new ClasspathEntry( getContentKind(), getEntryKind(), resolvedPath, this.inclusionPatterns, this.exclusionPatterns, getSourceAttachmentPath(), getSourceAttachmentRootPath(), getOutputLocation(), this.getReferencingEntry(), this.isExported, getAccessRules(), this.combineAccessRules, this.extraAttributes); }
public ClasspathEntry resolvedDotDot(IPath reference) { IPath resolvedPath = resolveDotDot(reference, this.path); if (resolvedPath == this.path) return this; return new ClasspathEntry( getContentKind(), getEntryKind(), resolvedPath, this.inclusionPatterns, this.exclusionPatterns, getSourceAttachmentPath(), getSourceAttachmentRootPath(), getOutputLocation(), this.getReferencingEntry(), this.isExported, getAccessRules(), this.combineAccessRules, this.extraAttributes); }
public ClasspathEntry resolvedDotDot(IPath reference) { IPath resolvedPath = resolveDotDot(reference, this.path); if (resolvedPath == this.path) return this; return new ClasspathEntry( getContentKind(), getEntryKind(), resolvedPath, this.inclusionPatterns, this.exclusionPatterns, getSourceAttachmentPath(), getSourceAttachmentRootPath(), getOutputLocation(), this.getReferencingEntry(), this.isExported, getAccessRules(), this.combineAccessRules, this.extraAttributes); }
public ClasspathEntry resolvedDotDot(IPath reference) { IPath resolvedPath = resolveDotDot(reference, this.path); if (resolvedPath == this.path) return this; return new ClasspathEntry( getContentKind(), getEntryKind(), resolvedPath, this.inclusionPatterns, this.exclusionPatterns, getSourceAttachmentPath(), getSourceAttachmentRootPath(), getOutputLocation(), this.getReferencingEntry(), this.isExported, getAccessRules(), this.combineAccessRules, this.extraAttributes); }
public ClasspathEntry resolvedDotDot(IPath reference) { IPath resolvedPath = resolveDotDot(reference, this.path); if (resolvedPath == this.path) return this; return new ClasspathEntry( getContentKind(), getEntryKind(), resolvedPath, this.inclusionPatterns, this.exclusionPatterns, getSourceAttachmentPath(), getSourceAttachmentRootPath(), getOutputLocation(), this.getReferencingEntry(), this.isExported, getAccessRules(), this.combineAccessRules, this.extraAttributes); }
public ClasspathEntry resolvedDotDot(IPath reference) { IPath resolvedPath = resolveDotDot(reference, this.path); if (resolvedPath == this.path) return this; return new ClasspathEntry( getContentKind(), getEntryKind(), resolvedPath, this.inclusionPatterns, this.exclusionPatterns, getSourceAttachmentPath(), getSourceAttachmentRootPath(), getOutputLocation(), this.getReferencingEntry(), this.isExported, getAccessRules(), this.combineAccessRules, this.extraAttributes); }
/** * Used to perform export/restriction propagation across referring projects/containers */ public ClasspathEntry combineWith(ClasspathEntry referringEntry) { if (referringEntry == null) return this; if (referringEntry.isExported() || referringEntry.getAccessRuleSet() != null ) { boolean combine = this.entryKind == CPE_SOURCE || referringEntry.combineAccessRules(); return new ClasspathEntry( getContentKind(), getEntryKind(), getPath(), this.inclusionPatterns, this.exclusionPatterns, getSourceAttachmentPath(), getSourceAttachmentRootPath(), getOutputLocation(), referringEntry.isExported() || this.isExported, // duplicate container entry for tagging it as exported combine(referringEntry.getAccessRules(), getAccessRules(), combine), this.combineAccessRules, this.extraAttributes); } // no need to clone return this; }
/** * Used to perform export/restriction propagation across referring projects/containers */ public ClasspathEntry combineWith(ClasspathEntry referringEntry) { if (referringEntry == null) return this; if (referringEntry.isExported() || referringEntry.getAccessRuleSet() != null ) { boolean combine = this.entryKind == CPE_SOURCE || referringEntry.combineAccessRules(); return new ClasspathEntry( getContentKind(), getEntryKind(), getPath(), this.inclusionPatterns, this.exclusionPatterns, getSourceAttachmentPath(), getSourceAttachmentRootPath(), getOutputLocation(), referringEntry.isExported() || this.isExported, // duplicate container entry for tagging it as exported combine(referringEntry.getAccessRules(), getAccessRules(), combine), this.combineAccessRules, this.extraAttributes); } // no need to clone return this; }
/** * Used to perform export/restriction propagation across referring projects/containers */ public ClasspathEntry combineWith(ClasspathEntry referringEntry) { if (referringEntry == null) return this; if (referringEntry.isExported() || referringEntry.getAccessRuleSet() != null ) { boolean combine = this.entryKind == CPE_SOURCE || referringEntry.combineAccessRules(); return new ClasspathEntry( getContentKind(), getEntryKind(), getPath(), this.inclusionPatterns, this.exclusionPatterns, getSourceAttachmentPath(), getSourceAttachmentRootPath(), getOutputLocation(), referringEntry.isExported() || this.isExported, // duplicate container entry for tagging it as exported combine(referringEntry.getAccessRules(), getAccessRules(), combine), this.combineAccessRules, this.extraAttributes); } // no need to clone return this; }