Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.sdk.device.midp.library.api
Class API

java.lang.Object
  extended by org.eclipse.mtj.core.sdk.device.midp.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.

EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same. Please do not use this API without consulting with the MTJ team.

Since:
1.0
Restriction:
This class is not intended to be subclassed by clients.

Constructor Summary
API()
          Construct a new API instance
 
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

Method Detail

equals

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

getIdentifier

public String getIdentifier()
Returns:
Returns the identifier.

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:

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:

getType

public APIType getType()
Returns:
Returns the type.

getVersion

public Version getVersion()
Returns:
Returns the version.

hashCode

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

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:

isRegistered

public boolean isRegistered()
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

setIdentifier

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

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 -

setRegistered

public void setRegistered(boolean registered)
Parameters:
registered -

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 -

setType

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

setVersion

public void setVersion(Version version)
Parameters:
version - The version 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)

toString

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

Mobile Tools for Java
Release 1.0