|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Object
|
+--GameObject
|
+--RealObject
|
+--Trap
A trap will grab any instances of a particular class and hold them hostage.
| Inner classes inherited from class RealObject |
RealObject.ContentsMessager, RealObject.DescriptionLineProcessor |
| Inner classes inherited from class GameObject |
GameObject.LeaveInfo |
| Field Summary | |
protected java.lang.Class |
trappee
|
| Fields inherited from class RealObject |
contents, longDescription, parentObject, shortDescription, spreadto |
| Fields inherited from class GameObject |
masterGame, name |
| Constructor Summary | |
(package private) |
Trap()
|
| Method Summary | |
void |
hello(RealObject enterer)
Check if the enterer's class is what we're looking for and if so, make us its parent. |
void |
initialize(java.lang.String initializer,
GameObject parentObjectArg)
The usual initialization |
| Methods inherited from class RealObject |
checkLeave, clone, doAction, getLongDescription, getParent, getShortDescription, getSpreadability, goodbye, isPredicate, preClone, register, roomOf, runSpy, setParent, spread, tellAll, unregister, wanderVia |
| Methods inherited from class GameObject |
announce, compareTo, getMasterGame, kill, listen, newInstance, setMasterGame, toString |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected java.lang.Class trappee
| Constructor Detail |
Trap()
| Method Detail |
public void hello(RealObject enterer)
hello in class RealObjectenterer - the object that's entering
public void initialize(java.lang.String initializer,
GameObject parentObjectArg)
throws GameException
initialize in class RealObjectinitializer - The fourth tilde piece is the name of the Class we're trapping.GameException - if the initializer specifies a nonexistent class name.
(But you can get away with trapping StringTokenizers and such, however
unlikely they are to walk in your door.
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||