All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class PREDATOR.ADT.ADT

java.lang.Object
   |
   +----PREDATOR.ADT.ADT

public abstract class ADT
extends Object
The base class for all E-ADTs. All java ADT classes subclass this class. This class essentially tells the Java interface how to interact with a data type. It provides the following information to the client:
  1. Whether this type is variable size in a record
  2. The required DataObject superclass
An DataObject object is akin to an instantiation of a data type. To permit interface extensibility, before creating a new DataObject, the ADT gives the interface the chance to subclass the DataObject to provide additional functionality. (This all occurs in the NewObject function.) The ObjectClass function is used by the interface to decide which subclass to offer the ADT.


Constructor Index

 o ADT()

Method Index

 o getMetaInfoClass()
Returns the class of the ADT's meta info.
 o getName()
Returns the (server) name of the ADT.
 o getObjectClass(ADTMetaInfo)
Returns the class of the ADT's object data.
 o getTypeId()
Returns the (server) ID number of the ADT.
 o isVariableSize(ADTMetaInfo)
Determines if the binary version of the ADT is variable size.
 o newMetaInfo(byte[])
Returns a new ADTMetaInfo suitable for use with this ADT.
 o newObject(byte[], ADTMetaInfo, SubclassSelector)
Returns a new DataObject suitable for use with this ADT.
 o setName(String)
Sets the name of this ADT.
 o setTypeId(int)
Sets the type ID of this ADT.

Constructors

 o ADT
 public ADT()

Methods

 o setName
 public final void setName(String Name)
Sets the name of this ADT.

Parameters:
Name - The name of this ADT
 o getName
 public final String getName()
Returns the (server) name of the ADT.

Returns:
The name of this ADT
 o setTypeId
 public final void setTypeId(int TypeId)
Sets the type ID of this ADT.

Parameters:
The - type ID number of the ADT (server-side)
 o getTypeId
 public final int getTypeId()
Returns the (server) ID number of the ADT.

Returns:
The ID number of this ADT
 o isVariableSize
 public boolean isVariableSize(ADTMetaInfo MetaInfo)
Determines if the binary version of the ADT is variable size. By default, this method returns false.

Parameters:
MetaInfo - The meta-info
Returns:
true if the in-record version of the ADT is variable size, false otherwise
 o getObjectClass
 public abstract Class getObjectClass(ADTMetaInfo MetaInfo)
Returns the class of the ADT's object data. For instance, the integer ADT returns IntegerObject.

Parameters:
MetaInfo - The meta-info
Returns:
The class of the ADT's object data
 o getMetaInfoClass
 public Class getMetaInfoClass()
Returns the class of the ADT's meta info. For instance, the audio ADT returns AudioMetaInfo.

Returns:
The class of the ADT's meta info
 o newMetaInfo
 public final ADTMetaInfo newMetaInfo(byte bytes[]) throws IllegalAccessException, InstantiationException
Returns a new ADTMetaInfo suitable for use with this ADT.

Parameters:
bytes - The binary version of the meta-info
Returns:
A new ADTMetaInfo object suitable for use with this ADT
Throws: IllegalAccessException
If the DataObject class is inaccessible
Throws: InstantiationException
If an error occurs while instantiating the DataObject class's object
 o newObject
 public final DataObject newObject(byte bytes[],
                                   ADTMetaInfo MetaInfo,
                                   SubclassSelector subclasser) throws IllegalAccessException, InstantiationException, BadSubclassSelectorException
Returns a new DataObject suitable for use with this ADT. It permits the GUI to specify a subclass of the original ObjectData class to that further GUI-oriented functionality can be used.

Parameters:
bytes - The binary version of the object
subclasser - A object which will select a subclass of the DataObject's class to extend functionality, or null if no subclass is desired
MetaInfo - The meta-info
Returns:
A new ObjectData object suitable for use with this ADT
Throws: IllegalAccessException
If the DataObject class is inaccessible
Throws: InstantiationException
If an error occurs while instantiating the DataObject class's object
Throws: BadSubclassSelectorException
If the subclasser returns a null class or one which is not a subclass of the parameter class
See Also:
SubclassSelector

All Packages  Class Hierarchy  This Package  Previous  Next  Index