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 |
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()
IClasspathEntryDescriptor
toClasspathEntry
in interface IClasspathEntryDescriptor
public String getScope()
getScope
in interface IClasspathEntryDescriptor
public boolean isOptionalDependency()
isOptionalDependency
in interface IClasspathEntryDescriptor
public void setClasspathAttribute(String name, String value)
setClasspathAttribute
in interface IClasspathEntryDescriptor
public Map<String,String> getClasspathAttributes()
getClasspathAttributes
in interface IClasspathEntryDescriptor
public String getGroupId()
IClasspathEntryDescriptor
getGroupId
in interface IClasspathEntryDescriptor
public String getArtifactId()
IClasspathEntryDescriptor
getArtifactId
in interface IClasspathEntryDescriptor
public org.eclipse.core.runtime.IPath getPath()
getPath
in interface IClasspathEntryDescriptor
public void setPath(org.eclipse.core.runtime.IPath path)
setPath
in interface IClasspathEntryDescriptor
public int getEntryKind()
getEntryKind
in interface IClasspathEntryDescriptor
public void setEntryKind(int entryKind)
setEntryKind
in interface IClasspathEntryDescriptor
public ArtifactKey getArtifactKey()
getArtifactKey
in interface IClasspathEntryDescriptor
public void setArtifactKey(ArtifactKey artifactKey)
setArtifactKey
in interface IClasspathEntryDescriptor
public void setSourceAttachment(org.eclipse.core.runtime.IPath srcPath, org.eclipse.core.runtime.IPath srcRoot)
setSourceAttachment
in interface IClasspathEntryDescriptor
public void setJavadocUrl(String javaDocUrl)
setJavadocUrl
in interface IClasspathEntryDescriptor
public org.eclipse.core.runtime.IPath getSourceAttachmentPath()
getSourceAttachmentPath
in interface IClasspathEntryDescriptor
public org.eclipse.core.runtime.IPath getSourceAttachmentRootPath()
getSourceAttachmentRootPath
in interface IClasspathEntryDescriptor
public String getJavadocUrl()
getJavadocUrl
in interface IClasspathEntryDescriptor
public void setScope(String scope)
setScope
in interface IClasspathEntryDescriptor
public void setOptionalDependency(boolean optional)
setOptionalDependency
in interface IClasspathEntryDescriptor
public void addAccessRule(org.eclipse.jdt.core.IAccessRule rule)
addAccessRule
in interface IClasspathEntryDescriptor
public List<org.eclipse.jdt.core.IAccessRule> getAccessRules()
getAccessRules
in interface IClasspathEntryDescriptor
public void setOutputLocation(org.eclipse.core.runtime.IPath outputLocation)
setOutputLocation
in interface IClasspathEntryDescriptor
public org.eclipse.core.runtime.IPath getOutputLocation()
getOutputLocation
in interface IClasspathEntryDescriptor
public void setInclusionPatterns(org.eclipse.core.runtime.IPath[] inclusionPatterns)
setInclusionPatterns
in interface IClasspathEntryDescriptor
public void addInclusionPattern(org.eclipse.core.runtime.IPath pattern)
addInclusionPattern
in interface IClasspathEntryDescriptor
public org.eclipse.core.runtime.IPath[] getInclusionPatterns()
getInclusionPatterns
in interface IClasspathEntryDescriptor
public void setExclusionPatterns(org.eclipse.core.runtime.IPath[] exclusionPatterns)
setExclusionPatterns
in interface IClasspathEntryDescriptor
public void addExclusionPattern(org.eclipse.core.runtime.IPath pattern)
addExclusionPattern
in interface IClasspathEntryDescriptor
public org.eclipse.core.runtime.IPath[] getExclusionPatterns()
getExclusionPatterns
in interface IClasspathEntryDescriptor
public void setExported(boolean exported)
setExported
in interface IClasspathEntryDescriptor
public boolean isExported()
isExported
in interface IClasspathEntryDescriptor
public void setCombineAccessRules(boolean combineAccessRules)
setCombineAccessRules
in interface IClasspathEntryDescriptor
public boolean combineAccessRules()
combineAccessRules
in interface IClasspathEntryDescriptor
public boolean isPomDerived()
IClasspathEntryDescriptor
true
if this classpath entry was derived from pom.xml and false
otherwise. isPomDerived
in interface IClasspathEntryDescriptor
IClasspathEntryDescriptor.setPomDerived(boolean)
public void setPomDerived(boolean derived)
IClasspathEntryDescriptor
true
) 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
Copyright © 2005–2015 Sonatype, Inc.. All rights reserved.