Class DefinedType

java.lang.Object
   |
   +----DefinedType

public class DefinedType
extends Object
implements Serializable
The class `DefinedType' represents a defined type which can have instances in the frame system, doing for DefinedTypeInstance what FrameClass does for Frame.


Constructor Index

 o DefinedType(Type)
Constructs this defined type by plugging in the given exjava Type object which is taken to represent it (it does so by copying the reference, which is maximally efficient, but the client should not then alter the Type directly, as that would compromise the integrity of the frame).

Method Index

 o getAllDefinedTypes()
Returns all the defined types in the frame system.
 o getTypeFrame()
Delivers up the underlying frame of this defined type.
 o lookup(String)
Looks up the defined type with the given name.
 o lookup(String, Express)
Looks up the defined type with the given name.
 o readClass(ObjectInput)
Deserialises the static data members (class variables) of DefinedType.
 o toString()
Returns the name of this defined type.
 o validateValue(Object)
Checks that the given value conforms to the underlying type of this defined type, raising exceptions if it does not.
 o writeClass(ObjectOutput)
Serialises the static data members (class variables) of DefinedType.

Constructors

 o DefinedType
 public DefinedType(Type typeFrame)
Constructs this defined type by plugging in the given exjava Type object which is taken to represent it (it does so by copying the reference, which is maximally efficient, but the client should not then alter the Type directly, as that would compromise the integrity of the frame).

Parameters:
typeFrame - An exjava Type object to wrap in this frame.

Methods

 o getTypeFrame
 public Frame getTypeFrame()
Delivers up the underlying frame of this defined type.

Returns:
The class frame representing this defined type.
 o validateValue
 public void validateValue(Object value)
Checks that the given value conforms to the underlying type of this defined type, raising exceptions if it does not. Validation is not actually implemented - this is just a hook.

Parameters:
value - The value to validate.
 o toString
 public String toString()
Returns the name of this defined type.

Returns:
s The string representation of this defined type.
Overrides:
toString in class Object
 o getAllDefinedTypes
 public static Enumeration getAllDefinedTypes()
Returns all the defined types in the frame system.

Returns:
An enumeration of all the defined types in the frame system.
 o lookup
 public static DefinedType lookup(String definedTypeName) throws DefinedTypeDoesNotExist
Looks up the defined type with the given name.

Parameters:
definedTypeName - The name of the frame class to return.
Returns:
The FrameClass object whose name is `frameClassName'.
Throws: DefinedTypeDoesNotExist
If there is not a frame class of that name.
 o lookup
 public static DefinedType lookup(String definedTypeName,
                                  Express frameClassModel) throws DefinedTypeDoesNotExist
Looks up the defined type with the given name.

Parameters:
definedTypeName - The name of the defined type to return.
frameClassModel - The EXPRESS model in which `definedTypeName' is defined, in case that defined type hasn't been constructed yet.
Returns:
The DefinedType object whose name is `definedTypeName'.
Throws: DefinedTypeDoesNotExist
If there is not a defined type of that name.
 o writeClass
 public static void writeClass(ObjectOutput oo) throws IOException
Serialises the static data members (class variables) of DefinedType.

Parameters:
oo - An output stream to save the class data to.
Throws: IOException
If an I/O exception occurs.
 o readClass
 public static void readClass(ObjectInput oi) throws IOException
Deserialises the static data members (class variables) of DefinedType.

Parameters:
oi - An input stream to save the class data to.
Throws: IOException
If an I/O exception occurs.