public class ClasspathEntryDescriptor extends java.lang.Object implements IClasspathEntryDescriptor
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<org.eclipse.jdt.core.IAccessRule> |
accessRules |
private ArtifactKey |
artifactKey |
private java.util.LinkedHashMap<java.lang.String,java.lang.String> |
attributes |
private boolean |
combineAccessRules |
private int |
entryKind |
private java.util.LinkedHashSet<org.eclipse.core.runtime.IPath> |
exclusionPatterns |
private boolean |
exported |
private java.util.LinkedHashSet<org.eclipse.core.runtime.IPath> |
inclusionPatterns |
private boolean |
optionalDependency |
private org.eclipse.core.runtime.IPath |
outputLocation |
private org.eclipse.core.runtime.IPath |
path |
private java.lang.String |
scope |
private org.eclipse.core.runtime.IPath |
sourceAttachmentPath |
private org.eclipse.core.runtime.IPath |
sourceAttachmentRootPath |
| Constructor and Description |
|---|
ClasspathEntryDescriptor(org.eclipse.jdt.core.IClasspathEntry entry) |
ClasspathEntryDescriptor(int entryKind,
org.eclipse.core.runtime.IPath path) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAccessRule(org.eclipse.jdt.core.IAccessRule rule) |
void |
addExclusionPattern(org.eclipse.core.runtime.IPath pattern) |
void |
addInclusionPattern(org.eclipse.core.runtime.IPath pattern) |
boolean |
combineAccessRules() |
java.util.List<org.eclipse.jdt.core.IAccessRule> |
getAccessRules() |
java.lang.String |
getArtifactId()
Short for getArtifactKey().getArtifactId(), with appropriate null check
|
ArtifactKey |
getArtifactKey() |
java.util.Map<java.lang.String,java.lang.String> |
getClasspathAttributes() |
int |
getEntryKind() |
org.eclipse.core.runtime.IPath[] |
getExclusionPatterns() |
java.lang.String |
getGroupId()
Short for getArtifactKey().getGroupId(), with appropriate null check
|
org.eclipse.core.runtime.IPath[] |
getInclusionPatterns() |
java.lang.String |
getJavadocUrl() |
org.eclipse.core.runtime.IPath |
getOutputLocation() |
org.eclipse.core.runtime.IPath |
getPath() |
java.lang.String |
getScope() |
org.eclipse.core.runtime.IPath |
getSourceAttachmentPath() |
org.eclipse.core.runtime.IPath |
getSourceAttachmentRootPath() |
boolean |
isExported() |
boolean |
isOptionalDependency() |
boolean |
isPomDerived()
Returns
true if this classpath entry was derived from pom.xml and false otherwise. |
void |
removeExclusionPattern(org.eclipse.core.runtime.IPath pattern) |
void |
removeInclusionPattern(org.eclipse.core.runtime.IPath pattern) |
void |
setArtifactKey(ArtifactKey artifactKey) |
void |
setClasspathAttribute(java.lang.String name,
java.lang.String value) |
private void |
setClasspathEntry(org.eclipse.jdt.core.IClasspathEntry entry) |
void |
setCombineAccessRules(boolean combineAccessRules) |
void |
setEntryKind(int entryKind) |
void |
setExclusionPatterns(org.eclipse.core.runtime.IPath[] exclusionPatterns) |
void |
setExported(boolean exported) |
void |
setInclusionPatterns(org.eclipse.core.runtime.IPath[] inclusionPatterns) |
void |
setJavadocUrl(java.lang.String javaDocUrl) |
void |
setOptionalDependency(boolean optional) |
void |
setOutputLocation(org.eclipse.core.runtime.IPath outputLocation) |
void |
setPath(org.eclipse.core.runtime.IPath path) |
void |
setPomDerived(boolean derived)
Marks classpath entry as derived from pom.xml (
true) or not (false). |
void |
setScope(java.lang.String scope) |
void |
setSourceAttachment(org.eclipse.core.runtime.IPath srcPath,
org.eclipse.core.runtime.IPath srcRoot) |
org.eclipse.jdt.core.IClasspathEntry |
toClasspathEntry()
Create IClasspathEntry with information collected in this descriptor
|
private int entryKind
private org.eclipse.core.runtime.IPath path
private boolean exported
private org.eclipse.core.runtime.IPath outputLocation
private java.util.List<org.eclipse.jdt.core.IAccessRule> accessRules
private java.util.LinkedHashMap<java.lang.String,java.lang.String> attributes
private org.eclipse.core.runtime.IPath sourceAttachmentPath
private org.eclipse.core.runtime.IPath sourceAttachmentRootPath
private java.util.LinkedHashSet<org.eclipse.core.runtime.IPath> inclusionPatterns
private java.util.LinkedHashSet<org.eclipse.core.runtime.IPath> exclusionPatterns
private boolean combineAccessRules
private ArtifactKey artifactKey
private java.lang.String scope
private boolean optionalDependency
public ClasspathEntryDescriptor(int entryKind,
org.eclipse.core.runtime.IPath path)
public ClasspathEntryDescriptor(org.eclipse.jdt.core.IClasspathEntry entry)
public org.eclipse.jdt.core.IClasspathEntry toClasspathEntry()
IClasspathEntryDescriptortoClasspathEntry in interface IClasspathEntryDescriptorpublic java.lang.String getScope()
getScope in interface IClasspathEntryDescriptorpublic boolean isOptionalDependency()
isOptionalDependency in interface IClasspathEntryDescriptorpublic void setClasspathAttribute(java.lang.String name,
java.lang.String value)
setClasspathAttribute in interface IClasspathEntryDescriptorpublic java.util.Map<java.lang.String,java.lang.String> getClasspathAttributes()
getClasspathAttributes in interface IClasspathEntryDescriptorpublic java.lang.String getGroupId()
IClasspathEntryDescriptorgetGroupId in interface IClasspathEntryDescriptorprivate void setClasspathEntry(org.eclipse.jdt.core.IClasspathEntry entry)
public java.lang.String getArtifactId()
IClasspathEntryDescriptorgetArtifactId in interface IClasspathEntryDescriptorpublic org.eclipse.core.runtime.IPath getPath()
getPath in interface IClasspathEntryDescriptorpublic void setPath(org.eclipse.core.runtime.IPath path)
setPath in interface IClasspathEntryDescriptorpublic int getEntryKind()
getEntryKind in interface IClasspathEntryDescriptorpublic void setEntryKind(int entryKind)
setEntryKind in interface IClasspathEntryDescriptorpublic ArtifactKey getArtifactKey()
getArtifactKey in interface IClasspathEntryDescriptorpublic void setArtifactKey(ArtifactKey artifactKey)
setArtifactKey in interface IClasspathEntryDescriptorpublic void setSourceAttachment(org.eclipse.core.runtime.IPath srcPath,
org.eclipse.core.runtime.IPath srcRoot)
setSourceAttachment in interface IClasspathEntryDescriptorpublic void setJavadocUrl(java.lang.String javaDocUrl)
setJavadocUrl in interface IClasspathEntryDescriptorpublic org.eclipse.core.runtime.IPath getSourceAttachmentPath()
getSourceAttachmentPath in interface IClasspathEntryDescriptorpublic org.eclipse.core.runtime.IPath getSourceAttachmentRootPath()
getSourceAttachmentRootPath in interface IClasspathEntryDescriptorpublic java.lang.String getJavadocUrl()
getJavadocUrl in interface IClasspathEntryDescriptorpublic void setScope(java.lang.String scope)
setScope in interface IClasspathEntryDescriptorpublic void setOptionalDependency(boolean optional)
setOptionalDependency in interface IClasspathEntryDescriptorpublic void addAccessRule(org.eclipse.jdt.core.IAccessRule rule)
addAccessRule in interface IClasspathEntryDescriptorpublic java.util.List<org.eclipse.jdt.core.IAccessRule> getAccessRules()
getAccessRules in interface IClasspathEntryDescriptorpublic void setOutputLocation(org.eclipse.core.runtime.IPath outputLocation)
setOutputLocation in interface IClasspathEntryDescriptorpublic org.eclipse.core.runtime.IPath getOutputLocation()
getOutputLocation in interface IClasspathEntryDescriptorpublic void setInclusionPatterns(org.eclipse.core.runtime.IPath[] inclusionPatterns)
setInclusionPatterns in interface IClasspathEntryDescriptorpublic void addInclusionPattern(org.eclipse.core.runtime.IPath pattern)
addInclusionPattern in interface IClasspathEntryDescriptorpublic void removeInclusionPattern(org.eclipse.core.runtime.IPath pattern)
removeInclusionPattern in interface IClasspathEntryDescriptorpublic org.eclipse.core.runtime.IPath[] getInclusionPatterns()
getInclusionPatterns in interface IClasspathEntryDescriptorpublic void setExclusionPatterns(org.eclipse.core.runtime.IPath[] exclusionPatterns)
setExclusionPatterns in interface IClasspathEntryDescriptorpublic void addExclusionPattern(org.eclipse.core.runtime.IPath pattern)
addExclusionPattern in interface IClasspathEntryDescriptorpublic void removeExclusionPattern(org.eclipse.core.runtime.IPath pattern)
removeExclusionPattern in interface IClasspathEntryDescriptorpublic org.eclipse.core.runtime.IPath[] getExclusionPatterns()
getExclusionPatterns in interface IClasspathEntryDescriptorpublic void setExported(boolean exported)
setExported in interface IClasspathEntryDescriptorpublic boolean isExported()
isExported in interface IClasspathEntryDescriptorpublic void setCombineAccessRules(boolean combineAccessRules)
setCombineAccessRules in interface IClasspathEntryDescriptorpublic boolean combineAccessRules()
combineAccessRules in interface IClasspathEntryDescriptorpublic boolean isPomDerived()
IClasspathEntryDescriptortrue if this classpath entry was derived from pom.xml and false otherwise. isPomDerived in interface IClasspathEntryDescriptorIClasspathEntryDescriptor.setPomDerived(boolean)public void setPomDerived(boolean derived)
IClasspathEntryDescriptortrue) or not (false).
Not-derived (or custom) entries are preserved during project configuration update, while derived entries are automatically removed whenever their corresponding pom.xml configuration is changed or removed.
All new classpath entries are marked as derived by default, however value of this flag is preserved when entry
descriptor is read from .classpath file. The intend is to make sure that custom classpath entries are not removed
automatically. Clients of IClasspathDescriptor API who prefer to manage cleanup of stale class classpath entries
explicitly may set derived flag to false.
Although not enforced, derived flag only applies to project 'raw' classpath entries. The flag is silently ignored for classpath container entries.
setPomDerived in interface IClasspathEntryDescriptor