Class DefinedType

java.lang.Object
  |
  +--DefinedType
All Implemented Interfaces:
java.io.Serializable

public class DefinedType
extends java.lang.Object
implements java.io.Serializable

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

See Also:
Serialized Form

Constructor Summary
DefinedType(jex.Type definedTypeType)
          Constructs this defined type by plugging in the given Jex 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 Summary
static void createDefinedTypes(jex.Schema schema)
          Create a DefinedType for every defined type in a given schema.
static java.util.Enumeration getAllDefinedTypes()
          Returns all the defined types in the frame system.
 java.lang.String getName()
          Returns the name of this defined type.
 Frame getTypeFrame()
          Delivers up the underlying frame of this defined type.
static DefinedType lookup(java.lang.String definedTypeName)
          Looks up the defined type with the given name.
static DefinedType lookup(java.lang.String definedTypeName, jex.Schema frameClassModel)
          Looks up the defined type with the given name.
static void readClass(java.io.ObjectInput oi)
          Deserialises the static data members (class variables) of DefinedType.
 java.lang.String toString()
          Returns a string representation of this defined type.
static void writeClass(java.io.ObjectOutput oo)
          Serialises the static data members (class variables) of DefinedType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefinedType

public DefinedType(jex.Type definedTypeType)
Constructs this defined type by plugging in the given Jex 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:
definedTypeType - A Jex Type object to wrap in this frame.
Method Detail

getTypeFrame

public Frame getTypeFrame()
Delivers up the underlying frame of this defined type.
Returns:
The class frame representing this defined type.

getName

public java.lang.String getName()
Returns the name of this defined type.
Returns:
The name of this defined type.

toString

public java.lang.String toString()
Returns a string representation of this defined type.
Overrides:
toString in class java.lang.Object
Returns:
The string representation of this defined type.

createDefinedTypes

public static void createDefinedTypes(jex.Schema schema)
Create a DefinedType for every defined type in a given schema.
Parameters:
schema - The schema.

getAllDefinedTypes

public static java.util.Enumeration getAllDefinedTypes()
Returns all the defined types in the frame system.
Returns:
An enumeration of all the defined types in the frame system.

lookup

public static DefinedType lookup(java.lang.String definedTypeName)
Looks up the defined type with the given name. A quick and convenient method which assumes that the defined type of that name (already) exists - if not, it will report an error and exit from within.
Parameters:
definedTypeName - The name of the frame class to return.
Returns:
The DefinedType object whose name is `definedTypeName'.
See Also:
lookup(String,Schema)

lookup

public static DefinedType lookup(java.lang.String definedTypeName,
                                 jex.Schema frameClassModel)
                          throws DefinedTypeDoesNotExist
Looks up the defined type with the given name. A more cumbersome version of the lookup method, for use when the defined type of that name may not have been constructed yet. If the defined type does not exist, it tries to construct it, looking up the defined type of that name in the given EXPRESS schema. Failing that, it throws a DefinedTypeDoesNotExist exception.
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 no defined type of that name exists already, and there is no defined type of that name in the frame class schema either.
See Also:
lookup(String)

writeClass

public static void writeClass(java.io.ObjectOutput oo)
                       throws java.io.IOException
Serialises the static data members (class variables) of DefinedType.
Parameters:
oo - An output stream to save the class data to.
Throws:
java.io.IOException - If an I/O exception occurs.

readClass

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