public class ClasspathEntryDescriptor extends Object implements IClasspathEntryDescriptor
| 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() |
List<org.eclipse.jdt.core.IAccessRule> |
getAccessRules() |
String |
getArtifactId()
Short for getArtifactKey().getArtifactId(), with appropriate null check
|
ArtifactKey |
getArtifactKey() |
Map<String,String> |
getClasspathAttributes() |
int |
getEntryKind() |
org.eclipse.core.runtime.IPath[] |
getExclusionPatterns() |
String |
getGroupId()
Short for getArtifactKey().getGroupId(), with appropriate null check
|
org.eclipse.core.runtime.IPath[] |
getInclusionPatterns() |
String |
getJavadocUrl() |
org.eclipse.core.runtime.IPath |
getOutputLocation() |
org.eclipse.core.runtime.IPath |
getPath() |
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(String name,
String value) |
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(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(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
|
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 String getScope()
getScope in interface IClasspathEntryDescriptorpublic boolean isOptionalDependency()
isOptionalDependency in interface IClasspathEntryDescriptorpublic void setClasspathAttribute(String name, String value)
setClasspathAttribute in interface IClasspathEntryDescriptorpublic Map<String,String> getClasspathAttributes()
getClasspathAttributes in interface IClasspathEntryDescriptorpublic String getGroupId()
IClasspathEntryDescriptorgetGroupId in interface IClasspathEntryDescriptorpublic 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(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 String getJavadocUrl()
getJavadocUrl in interface IClasspathEntryDescriptorpublic void setScope(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 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 IClasspathEntryDescriptorCopyright © 2005–2021 Eclipse Foundation. All rights reserved.