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:
- Whether this type is variable size in a record
- 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.
-
ADT()
-
-
getMetaInfoClass()
- Returns the class of the ADT's meta info.
-
getName()
- Returns the (server) name of the ADT.
-
getObjectClass(ADTMetaInfo)
- Returns the class of the ADT's object data.
-
getTypeId()
- Returns the (server) ID number of the ADT.
-
isVariableSize(ADTMetaInfo)
- Determines if the binary version of the ADT is variable size.
-
newMetaInfo(byte[])
- Returns a new ADTMetaInfo suitable for use with this ADT.
-
newObject(byte[], ADTMetaInfo, SubclassSelector)
- Returns a new DataObject suitable for use with this ADT.
-
setName(String)
- Sets the name of this ADT.
-
setTypeId(int)
- Sets the type ID of this ADT.
ADT
public ADT()
setName
public final void setName(String Name)
- Sets the name of this ADT.
- Parameters:
- Name - The name of this ADT
getName
public final String getName()
- Returns the (server) name of the ADT.
- Returns:
- The name of this ADT
setTypeId
public final void setTypeId(int TypeId)
- Sets the type ID of this ADT.
- Parameters:
- The - type ID number of the ADT (server-side)
getTypeId
public final int getTypeId()
- Returns the (server) ID number of the ADT.
- Returns:
- The ID number of this ADT
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
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
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
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
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