org.netbeans.modules.project.libraries/1 1.29.1

org.netbeans.api.project.libraries
Class Library

java.lang.Object
  extended by org.netbeans.api.project.libraries.Library

public final class Library
extends Object

Library models typed bundle of typed volumes.

Library volumes are typed and query-able by their type. The type is represented by type string. Strictly speaking volumes are named rather then typed but the name express their type. The volume is a list of resoruces.

For more details see the overview.


Field Summary
static String PROP_CONTENT
           
static String PROP_DESCRIPTION
           
static String PROP_NAME
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds PropertyChangeListener
 boolean equals(Object obj)
           
 List<URL> getContent(String volumeType)
          Access typed raw library data as URLs.
 String getDescription()
          Returns description of the library.
 String getDisplayName()
          Returns the display name of the library.
 LibraryManager getManager()
          Gets the associated library manager.
 String getName()
          Get library binding name.
 String getType()
          Gets the type of library.
 List<URI> getURIContent(String volumeType)
          Access typed raw library data as possibly relative URIs.
 int hashCode()
           
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes PropertyChangeListener
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_NAME

public static final String PROP_NAME
See Also:
Constant Field Values

PROP_DESCRIPTION

public static final String PROP_DESCRIPTION
See Also:
Constant Field Values

PROP_CONTENT

public static final String PROP_CONTENT
See Also:
Constant Field Values
Method Detail

getManager

public LibraryManager getManager()
Gets the associated library manager.

Returns:
the manager (may be the "default" global manager, or a local manager)
Since:
org.netbeans.modules.project.libraries/1 1.15

getContent

public List<URL> getContent(String volumeType)
Access typed raw library data as URLs.

The contents are defined by SPI providers and identified by the volume types. For example the j2se library supports the following volume types: classpath - the library classpath roots, src - the library sources, javadoc - the library javadoc. Your module must have contract with a particular provider's module to be able to query it effectively.

Parameters:
volumeType - which resources to return.
Returns:
list of URLs of given volume type (possibly empty but never null)

getURIContent

public List<URI> getURIContent(String volumeType)
Access typed raw library data as possibly relative URIs.

The contents are defined by SPI providers and identified by the volume types. For example the j2se library supports the following volume types: classpath - the library classpath roots, src - the library sources, javadoc - the library javadoc. Your module must have contract with a particular provider's module to be able to query it effectively.

Parameters:
volumeType - which resources to return.
Returns:
list of URIs of given volume type (possibly empty but never null)
Since:
org.netbeans.modules.project.libraries/1 1.18

getName

public String getName()
Get library binding name. The name identifies library in scope of one libraries storage.

Returns:
String with library name

getDescription

public String getDescription()
Returns description of the library. The description provides more detailed information about the library.

Returns:
String the description or null if the description is not available

getDisplayName

public String getDisplayName()
Returns the display name of the library. The display name is either equal to the name or is a localized version of the name.

Returns:
String the display name, never returns null.

getType

public String getType()
Gets the type of library. The library type identifies the provider which has created the library and implies the volues contained in it.

Returns:
String (e.g. j2se for J2SE library)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds PropertyChangeListener

Parameters:
listener -

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes PropertyChangeListener

Parameters:
listener -

toString

public String toString()
Overrides:
toString in class Object

org.netbeans.modules.project.libraries/1 1.29.1

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.