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.
-
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).
-
getAllDefinedTypes()
- Returns all the defined types in the frame system.
-
getTypeFrame()
- Delivers up the underlying frame of this defined type.
-
lookup(String)
- Looks up the defined type with the given name.
-
lookup(String, Express)
- Looks up the defined type with the given name.
-
readClass(ObjectInput)
- Deserialises the static data members (class variables) of
DefinedType.
-
toString()
- Returns the name of this defined type.
-
validateValue(Object)
- Checks that the given value conforms to the underlying type of this
defined type, raising exceptions if it does not.
-
writeClass(ObjectOutput)
- Serialises the static data members (class variables) of DefinedType.
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.
getTypeFrame
public Frame getTypeFrame()
- Delivers up the underlying frame of this defined type.
- Returns:
- The class frame representing this defined type.
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.
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
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.
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.
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.
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.
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.