|
org.netbeans.modules.project.libraries/1 1.14 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.api.project.libraries.LibraryManager
public final class LibraryManager
LibraryManager provides registry of the installed libraries. LibraryManager can be used to list all installed libraries or to query library by its system name.
Field Summary | |
---|---|
static String |
PROP_LIBRARIES
|
Method Summary | |
---|---|
void |
addLibrary(Library library)
Installs a new library into the library manager. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds PropertyChangeListener. |
static LibraryManager |
getDefault()
Get the default instance of the library manager. |
Library[] |
getLibraries()
List all library defined in the IDE. |
Library |
getLibrary(String name)
Returns library by its name. |
void |
removeLibrary(Library library)
Removes installed library |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes PropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROP_LIBRARIES
Method Detail |
---|
public Library getLibrary(String name)
name
- of the library, must not be null
public Library[] getLibraries()
null
public void addLibrary(Library library) throws IOException, IllegalArgumentException
A typical usage would be:
LibraryManager libraryManager = LibraryManager.getDefault(); LibraryImplementation libImpl = LibrariesSupport.getLibraryTypeProvider("j2se").createLibrary(); libImpl.setName("FooLibTest"); libImpl.setContent ("classpath",listOfResources); libraryManager.addLibrary(LibraryFactory.createLibrary(libImpl));
library
- to be installed, the library has to be created
with registered LibraryTypeProvider
.
IOException
- when the library cannot be stored
IllegalArgumentException
- if the library is not recognized by any
LibraryTypeProvider
or the library
of the same name already exists.public void removeLibrary(Library library) throws IOException, IllegalArgumentException
library
- to be removed.
IOException
- when library cannot be deleted.
IllegalArgumentException
- when library is not installed in a writable
LibraryProvider
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- to be notifiedpublic void removePropertyChangeListener(PropertyChangeListener listener)
listener
- public static LibraryManager getDefault()
|
org.netbeans.modules.project.libraries/1 1.14 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |