Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.model.library.impl
Class Library

java.lang.Object
  extended by org.eclipse.mtj.core.model.library.impl.Library
All Implemented Interfaces:
ILibrary, IPersistable

public class Library
extends Object
implements ILibrary

A library is a wrapper around a classpath item that attempts to provide further metadata about that library.


Constructor Summary
Library()
          Construct a new library.
 
Method Summary
 boolean equals(Library library)
          Test the equality of this library as compared to the specified library.
 boolean equals(Object obj)
           
 API getAPI(APIType apiType)
          Return the first API with a type matching the specified API type or null if none can be found.
 API[] getAPIs()
          Return the APIs associated with this library instance.
 API getConfiguration()
          Return the configuration API or null if this library does not provide a configuration.
 URL getJavadocURL()
           
 File getLibraryFile()
          Return the file that makes up this library.
 API getProfile()
          Return the profile API or null if this library does not provide a configuration.
 IPath getSourceAttachmentPath()
           
 IPath getSourceAttachmentRootPath()
           
 boolean hasConfiguration()
          Return a boolean indicating whether this library contains a configuration.
 int hashCode()
           
 boolean hasProfile()
          Return a boolean indicating whether this library contains a profile.
 void loadUsing(IPersistenceProvider persistenceProvider)
          Load the state of this object using the specified persistence state information.
 void setAccessRules(IAccessRule[] accessRules)
          Set the access rules for this library.
 void setApis(API[] apis)
           
 void setJavadocURL(URL javadocURL)
           
 void setLibraryFile(File libraryFile)
          Sets the file that makes up this library.
 void setSourceAttachmentPath(IPath sourceAttachmentPath)
           
 void setSourceAttachmentRootPath(IPath sourceAttachmentRootPath)
           
 void storeUsing(IPersistenceProvider persistenceProvider)
          Save the state of this object using the specified persistence state information.
 IClasspathEntry toClasspathEntry()
          Return the library as an instance of IClasspathEntry.
 File toFile()
          Return the library as an instance of java.io.File.
 String toString()
           
 URL toURL()
          Return the library as an instance of java.net.URL.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Library

public Library()
Construct a new library.

Method Detail

equals

public boolean equals(Library library)
Test the equality of this library as compared to the specified library.

Parameters:
library -
Returns:

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

getAPI

public API getAPI(APIType apiType)
Description copied from interface: ILibrary
Return the first API with a type matching the specified API type or null if none can be found.

Specified by:
getAPI in interface ILibrary
Returns:
See Also:
org.eclipse.mtj.core.model.library.ILibrary#getAPI(int)

getAPIs

public API[] getAPIs()
Description copied from interface: ILibrary
Return the APIs associated with this library instance.

Specified by:
getAPIs in interface ILibrary
Returns:
See Also:
ILibrary.getAPIs()

getConfiguration

public API getConfiguration()
Description copied from interface: ILibrary
Return the configuration API or null if this library does not provide a configuration.

Specified by:
getConfiguration in interface ILibrary
Returns:
See Also:
ILibrary.getConfiguration()

getJavadocURL

public URL getJavadocURL()
Returns:
Returns the javadocURL.

getLibraryFile

public File getLibraryFile()
Return the file that makes up this library.

Returns:
Returns the libraryFile.

getProfile

public API getProfile()
Description copied from interface: ILibrary
Return the profile API or null if this library does not provide a configuration.

Specified by:
getProfile in interface ILibrary
Returns:
See Also:
ILibrary.getProfile()

getSourceAttachmentPath

public IPath getSourceAttachmentPath()
Returns:
Returns the sourceAttachmentPath.

getSourceAttachmentRootPath

public IPath getSourceAttachmentRootPath()
Returns:
Returns the sourceAttachmentRootPath.

hasConfiguration

public boolean hasConfiguration()
Description copied from interface: ILibrary
Return a boolean indicating whether this library contains a configuration.

Specified by:
hasConfiguration in interface ILibrary
Returns:
See Also:
ILibrary.hasConfiguration()

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

hasProfile

public boolean hasProfile()
Description copied from interface: ILibrary
Return a boolean indicating whether this library contains a profile.

Specified by:
hasProfile in interface ILibrary
Returns:
See Also:
ILibrary.hasProfile()

loadUsing

public void loadUsing(IPersistenceProvider persistenceProvider)
               throws PersistenceException
Description copied from interface: IPersistable
Load the state of this object using the specified persistence state information.

Specified by:
loadUsing in interface IPersistable
Throws:
PersistenceException
See Also:
IPersistable.loadUsing(org.eclipse.mtj.core.persistence.IPersistenceProvider)

setAccessRules

public void setAccessRules(IAccessRule[] accessRules)
Set the access rules for this library.

Parameters:
accessRules -

setApis

public void setApis(API[] apis)
Parameters:
api - The apis to set.

setJavadocURL

public void setJavadocURL(URL javadocURL)
Parameters:
javadocURL - The javadocURL to set.

setLibraryFile

public void setLibraryFile(File libraryFile)
Sets the file that makes up this library.

Parameters:
libraryFile - The libraryFile to set.

setSourceAttachmentPath

public void setSourceAttachmentPath(IPath sourceAttachmentPath)
Parameters:
sourceAttachmentPath - The sourceAttachmentPath to set.

setSourceAttachmentRootPath

public void setSourceAttachmentRootPath(IPath sourceAttachmentRootPath)
Parameters:
sourceAttachmentRootPath - The sourceAttachmentRootPath to set.

storeUsing

public void storeUsing(IPersistenceProvider persistenceProvider)
                throws PersistenceException
Description copied from interface: IPersistable
Save the state of this object using the specified persistence state information.

Specified by:
storeUsing in interface IPersistable
Throws:
PersistenceException
See Also:
IPersistable.storeUsing(org.eclipse.mtj.core.persistence.IPersistenceProvider)

toClasspathEntry

public IClasspathEntry toClasspathEntry()
Description copied from interface: ILibrary
Return the library as an instance of IClasspathEntry.

Specified by:
toClasspathEntry in interface ILibrary
Returns:
See Also:
ILibrary.toClasspathEntry()

toFile

public File toFile()
Description copied from interface: ILibrary
Return the library as an instance of java.io.File.

Specified by:
toFile in interface ILibrary
Returns:
See Also:
ILibrary.toFile()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

toURL

public URL toURL()
Description copied from interface: ILibrary
Return the library as an instance of java.net.URL.

Specified by:
toURL in interface ILibrary
Returns:
See Also:
ILibrary.toURL()

Mobile Tools for Java
Release 1.0