Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.library.manager
Class LibraryManager

java.lang.Object
  extended by org.eclipse.mtj.core.library.manager.LibraryManager

public class LibraryManager
extends Object

Library Manager responsible for supply the libraries available in MTJ.

Since:
0.9.1

Method Summary
 void addLibraryToMidletProject(IProject project, String libName)
          Adds a library to a MIDlet project.
static LibraryManager getInstance()
          Get the LibraryManager instance.
 ILibrary getMidletLibrary(String libName)
          Gets corresponding library for the given name.
 String[] getMidletLibraryNames()
          Returns the names of all defined MIDlet libraries.
 void removeLibraryFromMidletProject(IProject project, String libName)
          Removes a library from a MIDlet project.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static LibraryManager getInstance()
Get the LibraryManager instance.

Returns:
the unique instance of the LibraryManager

addLibraryToMidletProject

public void addLibraryToMidletProject(IProject project,
                                      String libName)
                               throws CoreException
Adds a library to a MIDlet project.

Parameters:
project - target project.
libName - target library name.
Throws:
CoreException - If the project does not have a org.eclipse.mtj.core.nature or if the specified library does not exist in the library manager.

getMidletLibrary

public ILibrary getMidletLibrary(String libName)
Gets corresponding library for the given name.

Parameters:
libName - the library name
Returns:
the library for a given name or null if no such library exists.

getMidletLibraryNames

public String[] getMidletLibraryNames()
Returns the names of all defined MIDlet libraries. The corresponding classpath container path is the name appended to the CONTAINER_ID.

Returns:
the names of all defined MIDlet libraries

removeLibraryFromMidletProject

public void removeLibraryFromMidletProject(IProject project,
                                           String libName)
                                    throws CoreException
Removes a library from a MIDlet project.

Parameters:
project - target project.
libName - target library name.
Throws:
CoreException - If the project does not have a org.eclipse.mtj.core.nature or if the specified library does not exist in the library manager.

Mobile Tools for Java
Release 1.0