Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.model.library.api
Class API

java.lang.Object
  extended by org.eclipse.mtj.core.model.library.api.API
All Implemented Interfaces:
IPersistable

public class API
extends Object
implements IPersistable

Instances of this class represent the API provided by an ILibrary instance.


Constructor Summary
API()
          Construct a new API instance
API(IConfigurationElement configurationElement)
          Construct a new API instance for the registry element.
 
Method Summary
 boolean equals(Object obj)
           
 String getIdentifier()
           
 String getName()
           
 String getPrimaryMatchableClass()
          Return the fully-qualifed class name of the primary class for this API that can be used for matching.
 URL[] getSkeletonReplacements()
          Return the replacement files that are useful for preverification and devices such as MPowerPlayer and microemu.
 APIType getType()
           
 Version getVersion()
           
 int hashCode()
           
 boolean isConfiguration()
          Return a boolean indicating whether this API is a configuration library.
 boolean isProfile()
          Return a boolean indicating whether this API is a profile library.
 boolean isRegistered()
           
 void loadUsing(IPersistenceProvider persistenceProvider)
          Load the state of this object using the specified persistence state information.
 void setIdentifier(String identifier)
           
 void setName(String name)
           
 void setPrimaryMatchableClass(String primaryMatchableClass)
          Set the fully-qualified class name of the primary class for this API that can be used for matching.
 void setRegistered(boolean registered)
           
 void setSkeletonReplacements(URL[] verifiableReplacements)
          Set the replacement files that are useful for preverification.
 void setType(APIType type)
           
 void setVersion(Version version)
           
 void storeUsing(IPersistenceProvider persistenceProvider)
          Save the state of this object using the specified persistence state information.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

API

public API()
Construct a new API instance


API

public API(IConfigurationElement configurationElement)
    throws IOException
Construct a new API instance for the registry element.

Parameters:
configurationElement -
Throws:
IOException
Method Detail

equals

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

hashCode

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

getIdentifier

public String getIdentifier()
Returns:
Returns the identifier.

setIdentifier

public void setIdentifier(String identifier)
Parameters:
identifier - The identifier to set.

getName

public String getName()
Returns:
Returns the name.

getPrimaryMatchableClass

public String getPrimaryMatchableClass()
Return the fully-qualifed class name of the primary class for this API that can be used for matching.

Returns:

setName

public void setName(String name)
Parameters:
name - The name to set.

setPrimaryMatchableClass

public void setPrimaryMatchableClass(String primaryMatchableClass)
Set the fully-qualified class name of the primary class for this API that can be used for matching.

Parameters:
primaryMatchableClass -

getType

public APIType getType()
Returns:
Returns the type.

isRegistered

public boolean isRegistered()
Returns:

setRegistered

public void setRegistered(boolean registered)
Parameters:
registered -

getSkeletonReplacements

public URL[] getSkeletonReplacements()
Return the replacement files that are useful for preverification and devices such as MPowerPlayer and microemu. These are likely skeleton/empty API implementation jars that can be safely run through a preverifier. May return null if there are not replacements for this particular API.

Returns:

setType

public void setType(APIType type)
Parameters:
type - The type to set.

getVersion

public Version getVersion()
Returns:
Returns the version.

setSkeletonReplacements

public void setSkeletonReplacements(URL[] verifiableReplacements)
Set the replacement files that are useful for preverification. These are likely skeleton/empty API implementation jars that can be safely run through a preverifier.

Parameters:
verifiableReplacements -

setVersion

public void setVersion(Version version)
Parameters:
version - The version to set.

isConfiguration

public boolean isConfiguration()
Return a boolean indicating whether this API is a configuration library.

Returns:

isProfile

public boolean isProfile()
Return a boolean indicating whether this API is a profile library.

Returns:

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)

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()
Overrides:
toString in class Object
See Also:
Object.toString()

Mobile Tools for Java
Release 1.0