|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.squawk.Suite
public final class Suite
A suite is the unit of deployment/compilation in the Squawk system.
| Field Summary | |
|---|---|
static int |
APPLICATION
Denotes a suite that encapsulates an application. |
static int |
DEBUG
Denotes a suite that is being debugged. |
static int |
EXTENDABLE_LIBRARY
Denotes a suite that encapsulates an open library. |
static int |
LIBRARY
Denotes a suite that encapsulates a library. |
static String |
PROPERTIES_MANIFEST_RESOURCE_NAME
Denotes the name of the resource that represents the resource name from which I extract properties from when an installResource(ResourceFile) is done. |
| Method Summary | |
|---|---|
void |
close()
Closes this suite. |
boolean |
equals(Object other)
Compares this suite with another object for equality. |
int |
getClassCount()
Gets the number of classes in this suite. |
String |
getConfiguration()
Gets the configuration of the suite. |
Klass |
getKlass(int suiteID)
Gets the class in this suite corresponding to a given class number. |
String |
getManifestProperty(String name)
Gets the value of an PROPERTIES_MANIFEST_RESOURCE_NAME property embedded in the suite. |
String |
getName()
Gets this suite's name. |
int |
getNextAvailableClassNumber()
Gets the next available number for a class that will be installed in this suite. |
Suite |
getParent()
Gets the parent suite of this suite. |
InputStream |
getResourceAsStream(String name,
Klass klass)
Finds a resource with a given name. |
byte[] |
getResourceData(String name)
Gets the contents of a resource file embedded in the suite. |
static Suite |
getSuite(String uri)
Gets the Suite corresponding to a given URI, loading it if necessary. |
String |
getURI()
Gets the URI identifier of the serialized form of this suite. |
int |
hashCode()
Returns a hashcode for this suite which is derived solely from the suite's name. |
void |
installClass(Klass klass)
Installs a given class into this suite. |
void |
installProperty(ManifestProperty property)
Installs a collection of IMlet property values into this suite. |
void |
installResource(ResourceFile resourceFile)
Installs a collection of resource files into this suite. |
boolean |
isBootstrap()
Determines if this is the bootstrap suite containing the system classes. |
boolean |
isClosed()
Determines if this suite is closed. |
protected void |
loadProperties(byte[] bytes)
Parse properties from jar manifest file. |
Klass |
lookup(String name)
Gets the Klass instance from this suite corresponding
to a specified class name in internal form. |
void |
printAPI(PrintStream out)
Prints a textual description of the components in this suite that can be linked against. |
void |
save(DataOutputStream dos,
String uri)
Serializes the object graph rooted by this suite and writes it to a given stream. |
void |
save(DataOutputStream dos,
String uri,
boolean bigEndian)
Serializes the object graph rooted by this suite and writes it to a given stream. |
Suite |
strip(int type)
Creates a copy of this suite with its symbolic information stripped according to the given parameters. |
String |
toString()
Gets a string representation of this suite. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int APPLICATION
public static final int LIBRARY
public static final int EXTENDABLE_LIBRARY
public static final int DEBUG
public static final String PROPERTIES_MANIFEST_RESOURCE_NAME
installResource(ResourceFile) is done.
| Method Detail |
|---|
public String getName()
public Suite getParent()
public String getURI()
public int getClassCount()
public boolean isClosed()
public boolean isBootstrap()
public int getNextAvailableClassNumber()
public Klass getKlass(int suiteID)
suiteID - the class number of the class to retrieve
suiteIDpublic byte[] getResourceData(String name)
name - the name of the resource file whose contents is to be retrieved
public String getManifestProperty(String name)
PROPERTIES_MANIFEST_RESOURCE_NAME property embedded in the suite.
name - the name of the property whose value is to be retrieved
public final InputStream getResourceAsStream(String name,
Klass klass)
name - name of the desired resourceklass - Used to get the absolute path to resource if name is not absolute, if null, then assume resource name is absolute
java.io.InputStream object.public String toString()
toString in class Objectpublic void installClass(Klass klass)
klass - the class to installpublic void installResource(ResourceFile resourceFile)
resources - array of resource files to installprotected void loadProperties(byte[] bytes)
public void installProperty(ManifestProperty property)
properties - IMlet properties array to installpublic Klass lookup(String name)
Klass instance from this suite corresponding
to a specified class name in internal form.
name - the name (in internal form) of the class to lookup
Klass instance corresponding to
internalName or null if there
isn't one.public final boolean equals(Object other)
other is a Suite instance
and its name is equal to this suite's name.
equals in class Objectother - the object to compare this suite against
other is a Suite instance
and its name is equal to this suite's nameBoolean.hashCode(),
Hashtablepublic final int hashCode()
hashCode in class ObjectObject.equals(java.lang.Object),
Hashtablepublic static Suite getSuite(String uri)
uri - the URI identifying the object memory
uri
java.lang.LinkageError - if the suite denoted by URI is not available or there was
a problem while loading itpublic String getConfiguration()
public void save(DataOutputStream dos,
String uri)
throws IOException
dos - the DataOutputStream to which the serialized suite should be writtenuri - the URI identifier of the serialized suite
OutOfMemoryError - if there was insufficient memory to do the save
IOException - if there was some IO problem while writing the output
public void save(DataOutputStream dos,
String uri,
boolean bigEndian)
throws IOException
dos - the DataOutputStream to which the serialized suite should be writtenuri - the URI identifier of the serialized suitebigEndian - the endianess to be used when serializing this suite
OutOfMemoryError - if there was insufficient memory to do the save
IOException - if there was some IO problem while writing the outputpublic void close()
public Suite strip(int type)
type - specifies the type of the suite after closing. Must be
APPLICATION, LIBRARY, EXTENDABLE_LIBRARY or DEBUG.public void printAPI(PrintStream out)
out - where to print the description
|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||