Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.model
Class Classpath

java.lang.Object
  extended by org.eclipse.mtj.core.model.Classpath
All Implemented Interfaces:
IPersistable
Direct Known Subclasses:
VMInstallClasspath

public class Classpath
extends Object
implements IPersistable

A representation of a classpath that can be converted to various other representations.


Constructor Summary
Classpath()
          Construct a new classpath instance
 
Method Summary
 void addEntry(ILibrary pathEntry)
          Add a new classpath entry.
 IClasspathEntry[] asClasspathEntries()
          Return the classpath as a set of Eclipse JDT classpath entries.
 File[] asFileArray()
          Return the classpath as an array of the file entries in the classpath.
 File[] asSkeletonFileArray()
          Return the libraries as skeleton API files.
 URL[] asSkeletonURLArray()
          Return the libraries with skeleton API file URLs where possible.
 URL[] asURLArray()
          Return the classpath as an array of URL's.
 boolean equals(Classpath classpath)
          Test the equality of this class with another classpath.
 boolean equals(Object obj)
           
 ILibrary[] getEntries()
          Return the entries in the classpath.
 int hashCode()
           
 void loadUsing(IPersistenceProvider persistenceProvider)
          Load the state of this object using the specified persistence state information.
 void removeEntry(ILibrary library)
          Remove the specified library from the classpath, if it is in the classpath.
 void storeUsing(IPersistenceProvider persistenceProvider)
          Save the state of this object using the specified persistence state information.
 String toString()
          Converts the classpath to a classpath string with platform-dependent path separator characters.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Classpath

public Classpath()
Construct a new classpath instance

Method Detail

addEntry

public void addEntry(ILibrary pathEntry)
Add a new classpath entry.

Parameters:
pathEntry -

asClasspathEntries

public IClasspathEntry[] asClasspathEntries()
Return the classpath as a set of Eclipse JDT classpath entries.

Returns:

asFileArray

public File[] asFileArray()
Return the classpath as an array of the file entries in the classpath.

Returns:

asSkeletonFileArray

public File[] asSkeletonFileArray()
Return the libraries as skeleton API files. If the skeleton URL's cannot be resolved to local file system files, they will not be returned.

Returns:

asSkeletonURLArray

public URL[] asSkeletonURLArray()
Return the libraries with skeleton API file URLs where possible.

Returns:

asURLArray

public URL[] asURLArray()
Return the classpath as an array of URL's.

Returns:

equals

public boolean equals(Classpath classpath)
Test the equality of this class with another classpath.

Parameters:
classpath -
Returns:

equals

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

getEntries

public ILibrary[] getEntries()
Return the entries in the classpath.

Returns:

hashCode

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

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
Parameters:
persistenceProvider -
Throws:
PersistenceException

removeEntry

public void removeEntry(ILibrary library)
Remove the specified library from the classpath, if it is in the classpath.

Parameters:
library -

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)

toString

public String toString()
Converts the classpath to a classpath string with platform-dependent path separator characters.

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

Mobile Tools for Java
Release 1.0