|
org.netbeans.modules.java.project/1 1.12 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.spi.java.project.classpath.ProjectClassPathModifierImplementation
public abstract class ProjectClassPathModifierImplementation
An SPI for project's classpaths modification.
A project can provide subclass of this class in its lookup to
allow clients to add or remove new classpath elements (JAR, folder, dependent project, or library) to its
classpaths.
| Constructor Summary | |
|---|---|
protected |
ProjectClassPathModifierImplementation()
|
| Method Summary | |
|---|---|
protected abstract boolean |
addAntArtifacts(AntArtifact[] artifacts,
URI[] artifactElements,
SourceGroup sourceGroup,
String type)
Adds artifacts (e.g. |
protected abstract boolean |
addLibraries(Library[] libraries,
SourceGroup sourceGroup,
String type)
Adds libraries into the project's classpath if the libraries are not already included. |
protected abstract boolean |
addRoots(URL[] classPathRoots,
SourceGroup sourceGroup,
String type)
Adds archive files or folders into the project's classpath if the entries are not already there. |
protected abstract String[] |
getExtensibleClassPathTypes(SourceGroup sourceGroup)
Returns the types of classpaths for given SourceGroup which may be modified. |
protected abstract SourceGroup[] |
getExtensibleSourceGroups()
Returns the SourceGroups providing classpath(s)
which may be modified. |
protected abstract boolean |
removeAntArtifacts(AntArtifact[] artifacts,
URI[] artifactElements,
SourceGroup sourceGroup,
String type)
Removes artifacts (e.g. |
protected abstract boolean |
removeLibraries(Library[] libraries,
SourceGroup sourceGroup,
String type)
Removes libraries from the project's classpath if the libraries are included on it. |
protected abstract boolean |
removeRoots(URL[] classPathRoots,
SourceGroup sourceGroup,
String type)
Removes archive files or folders from the project's classpath if the entries are included on it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ProjectClassPathModifierImplementation()
| Method Detail |
|---|
protected abstract SourceGroup[] getExtensibleSourceGroups()
SourceGroups providing classpath(s)
which may be modified.
SourceGroup, never returns nullprotected abstract String[] getExtensibleClassPathTypes(SourceGroup sourceGroup)
SourceGroup which may be modified.
sourceGroup - for which the classpath types should be returned
protected abstract boolean addLibraries(Library[] libraries, SourceGroup sourceGroup, String type) throws IOException, UnsupportedOperationException
libraries - to be addedsourceGroup - of type JavaProjectConstants.SOURCES_TYPE_JAVA
identifying the compilation unit to changetype - the type of the classpath the library should be added to,
eg ClassPath.COMPILE
IOException - in case the project metadata cannot be changed
UnsupportedOperationException - is thrown when the project does not support
adding of a library to the classpath of the given type.protected abstract boolean removeLibraries(Library[] libraries, SourceGroup sourceGroup, String type) throws IOException, UnsupportedOperationException
libraries - to be removedsourceGroup - of type JavaProjectConstants.SOURCES_TYPE_JAVA
identifying the compilation unit to changetype - the type of the classpath the library should be removed from,
eg ClassPath.COMPILE
IOException - in case the project metadata cannot be changed
UnsupportedOperationException - is thrown when the project does not support
removing of a library from the classpath of the given type.protected abstract boolean addRoots(URL[] classPathRoots, SourceGroup sourceGroup, String type) throws IOException, UnsupportedOperationException
classPathRoots - roots to be added, each root has to be either a root of an archive or a foldersourceGroup - of type JavaProjectConstants.SOURCES_TYPE_JAVA
identifying the compilation unit to changetype - the type of the classpath the root should be added to,
eg ClassPath.COMPILE
IOException - in case the project metadata cannot be changed
UnsupportedOperationException - is thrown when the project does not support
adding of a root to the classpath of the given type.protected abstract boolean removeRoots(URL[] classPathRoots, SourceGroup sourceGroup, String type) throws IOException, UnsupportedOperationException
classPathRoots - roots to be removed, each root has to be either a root of an archive or a foldersourceGroup - of type JavaProjectConstants.SOURCES_TYPE_JAVA
identifying the compilation unit to changetype - the type of the classpath the root should be removed from,
eg ClassPath.COMPILE
IOException - in case the project metadata cannot be changed
UnsupportedOperationException - is thrown when the project does not support
removing of a root from the classpath of the given type.protected abstract boolean addAntArtifacts(AntArtifact[] artifacts, URI[] artifactElements, SourceGroup sourceGroup, String type) throws IOException, UnsupportedOperationException
artifacts - to be addedartifactElements - the URIs of the build output, the artifactElements has to have the same length
as artifacts.
(must be owned by the artifact and be relative to it)sourceGroup - of type JavaProjectConstants.SOURCES_TYPE_JAVA
identifying the compilation unit to changetype - the type of the classpath the artifact should be added to,
eg ClassPath.COMPILE
IOException - in case the project metadata cannot be changed
UnsupportedOperationException - is thrown when the project does not support
adding of an artifact to the classpath of the given type.protected abstract boolean removeAntArtifacts(AntArtifact[] artifacts, URI[] artifactElements, SourceGroup sourceGroup, String type) throws IOException, UnsupportedOperationException
artifacts - to be addedartifactElements - the URIs of the build output, the artifactElements has to have the same length
as artifacts.
(must be owned by the artifact and be relative to it)sourceGroup - of type JavaProjectConstants.SOURCES_TYPE_JAVA
identifying the compilation unit to changetype - the type of the classpath the artifact should be removed from,
eg ClassPath.COMPILE
IOException - in case the project metadata cannot be changed
UnsupportedOperationException - is thrown when the project does not support
removing of an artifact from the classpath of the given type.
|
org.netbeans.modules.java.project/1 1.12 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||