|
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.api.java.project.classpath.ProjectClassPathModifier
public class ProjectClassPathModifier
An API for project's classpaths modification. An client can use this interface to add/remove classpath element (folder, archive, library, subproject) to/from the project's classpath. Not all operations on all project's classpath are supported, if the project type does not support a modification of a given classpath the UnsupportedOperationException is thrown.
Method Summary | |
---|---|
static boolean |
addAntArtifacts(AntArtifact[] artifacts,
URI[] artifactElements,
FileObject projectArtifact,
String classPathType)
Adds artifacts (e.g. |
static boolean |
addLibraries(Library[] libraries,
FileObject projectArtifact,
String classPathType)
Adds libraries into the project's classpath if the libraries are not already included. |
static boolean |
addRoots(URL[] classPathRoots,
FileObject projectArtifact,
String classPathType)
Adds archive files or folders into the project's classpath if the entries are not already there. |
static boolean |
removeAntArtifacts(AntArtifact[] artifacts,
URI[] artifactElements,
FileObject projectArtifact,
String classPathType)
Removes artifacts (e.g. |
static boolean |
removeLibraries(Library[] libraries,
FileObject projectArtifact,
String classPathType)
Removes libraries from the project's classpath if the libraries are included on it. |
static boolean |
removeRoots(URL[] classPathRoots,
FileObject projectArtifact,
String classPathType)
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 |
Method Detail |
---|
public static boolean addLibraries(Library[] libraries, FileObject projectArtifact, String classPathType) throws IOException, UnsupportedOperationException
libraries
- to be addedprojectArtifact
- a file whose classpath should be extendedclassPathType
- the type of classpath to be extended, @see ClassPath
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.public static boolean removeLibraries(Library[] libraries, FileObject projectArtifact, String classPathType) throws IOException, UnsupportedOperationException
libraries
- to be removedprojectArtifact
- a file from whose classpath the libraries should be removedclassPathType
- the type of classpath, @see ClassPath
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.public static boolean addRoots(URL[] classPathRoots, FileObject projectArtifact, String classPathType) throws IOException, UnsupportedOperationException
classPathRoots
- roots to be added, each root has to be either a root of an archive or a folderprojectArtifact
- a file whose classpath should be extendedclassPathType
- the type of classpath to be extended, @see ClassPath
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.public static boolean removeRoots(URL[] classPathRoots, FileObject projectArtifact, String classPathType) throws IOException, UnsupportedOperationException
classPathRoots
- roots to be removed, each root has to be either a root of an archive or a folderprojectArtifact
- a file from whose classpath the roots should be removedclassPathType
- the type of classpath, @see ClassPath
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.public static boolean addAntArtifacts(AntArtifact[] artifacts, URI[] artifactElements, FileObject projectArtifact, String classPathType) 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)projectArtifact
- a file whose classpath should be extendedclassPathType
- the type of classpath to be extended, @see ClassPath
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.public static boolean removeAntArtifacts(AntArtifact[] artifacts, URI[] artifactElements, FileObject projectArtifact, String classPathType) 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)projectArtifact
- a file from whose classpath the dependent projects should be removedclassPathType
- the type of classpath, @see ClassPath
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 |