|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--FrameTemplate
The class `FrameTemplate' represents a frame template, which encodes how to convert a given Java (in particular, Jex) object to a frame.
Constructor Summary | |
FrameTemplate(FrameClass frameClass,
java.lang.Class jClass,
java.lang.String jId)
Constructs this frame template. |
Method Summary | |
static FrameTemplate |
find(java.lang.Class jClass)
Finds a frame template that is appropriate to a given Java (Jex) object class. |
FrameClass |
getFrameClass()
Returns the frame class of this frame template. |
java.lang.Object |
getSlotFiller(Slot slot)
Returns the filler of a given slot. |
java.lang.Object |
getSlotFiller(java.lang.String slotName)
Returns the filler of a given slot. |
java.util.ListIterator |
getSlots()
Returns an iterator over the filled slots in this frame template, in the order that they were filled. |
void |
print(java.io.PrintStream ps)
Prints the frame template in human-readable text form. |
static void |
readClass(java.io.ObjectInput oi)
Deserialises the static data members (class variables) of FrameTemplate. |
void |
setSlotFiller(Slot slot,
java.lang.Object filler)
Fills a given slot with a given value. |
void |
setSlotFiller(java.lang.String slotName,
java.lang.Object filler)
Fills a given slot with a given value. |
java.lang.String |
toString()
Returns a string representing this frame template. |
static void |
writeClass(java.io.ObjectOutput oo)
Serialises the static data members (class variables) of FrameTemplate. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public FrameTemplate(FrameClass frameClass, java.lang.Class jClass, java.lang.String jId)
frameClass
- The frame class of the frame template to be
constructed, which specifies the set of slots the
frame template should have.jClass
- The Java class associated with this frame template.jId
- The name of the Java object identifier associated with
this frame template.Method Detail |
public static FrameTemplate find(java.lang.Class jClass)
jClass
- The Java (Jex) class that you want to find a frame
template to convert.public FrameClass getFrameClass()
getFrameClass
in interface FrameInterface
public java.lang.Object getSlotFiller(Slot slot)
getSlotFiller
in interface FrameInterface
slot
- The slot whose filler you want to read.public java.lang.Object getSlotFiller(java.lang.String slotName) throws InvalidSlot
getSlotFiller
in interface FrameInterface
slot
- The name of the slot whose filler you want to read.InvalidSlot
- If the frame templatedoes not have a slot of
that name (as specified in its frame class).public void setSlotFiller(Slot slot, java.lang.Object filler)
setSlotFiller
in interface FrameInterface
slot
- The slot you want to write into.filler
- The filler (value) you want to write into `slot',
which must be of the right type for `slot'.public void setSlotFiller(java.lang.String slotName, java.lang.Object filler) throws InvalidSlot
setSlotFiller
in interface FrameInterface
slot
- The name of the slot you want to write into.filler
- The filler (value) you want to write into the slot,
which must be of the right type for the slot.InvalidSlot
- If the frame template does not have that
slot (as specified in its frame class).public java.util.ListIterator getSlots()
getSlots
in interface FrameInterface
public java.lang.String toString()
toString
in interface FrameInterface
toString
in class java.lang.Object
public void print(java.io.PrintStream ps)
print
in interface FrameInterface
ps
- A stream to print the frame template to.public static void writeClass(java.io.ObjectOutput oo) throws java.io.IOException
oo
- An output stream to save the class data to.java.io.IOException
- If an I/O exception occurs.public static void readClass(java.io.ObjectInput oi) throws java.io.IOException
oi
- An input stream to save the class data to.java.io.IOException
- If an I/O exception occurs.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |