edu.cmu.emulator.event
Class EmuEvent

java.lang.Object
  extended by edu.cmu.emulator.event.EmuEvent
All Implemented Interfaces:
Comparable
Direct Known Subclasses:
MethodCall

public class EmuEvent
extends Object
implements Comparable

The class which represents an event in the Emulator. It encapsulates all the characteristics of an event: the time at which the event should be executed, the target of the event, the event id, etc. FIXME - THE EVENT PARSING REALLY DOESN'T BELONG IN THIS CLASS NEITHER DO THE ET_ ETC. BELONG HERE SINCE THESE ARE REALLY SCRIPT COMMANDS.


Field Summary
protected  long eid
           
protected  boolean iThread
           
protected  String name
           
protected  EmuEvent next
           
protected  MovableObject obj
           
protected static boolean saveSourceInformation
           
protected  Throwable source
           
protected  EmuEventTarget target
           
protected  long time
           
 
Constructor Summary
EmuEvent(long time)
           
EmuEvent(long time, EmuEventTarget target)
           
EmuEvent(long time, EmuEventTarget target, MovableObject obj)
           
 
Method Summary
 void clearEID()
           
 int compareTo(Object obj)
           
 String getDebugString()
           
 long getEID()
           
 boolean getIThread()
           
 EmuEvent getNext()
           
 MovableObject getObject()
           
 Throwable getSource()
           
 EmuEventTarget getTarget()
           
 long getTime()
           
 void init(long time)
           
 void init(long time, EmuEventTarget target)
           
protected  void saveStackTrace()
           
 void setEID(long eid)
           
 void setIThread(boolean iThread)
           
 void setNext(EmuEvent next)
           
 void setTime(long time)
           
 String toString()
          Used to display the contents of the event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name

time

protected long time

target

protected EmuEventTarget target

source

protected Throwable source

eid

protected long eid

next

protected EmuEvent next

obj

protected MovableObject obj

iThread

protected boolean iThread

saveSourceInformation

protected static final boolean saveSourceInformation
See Also:
Constant Field Values
Constructor Detail

EmuEvent

public EmuEvent(long time)

EmuEvent

public EmuEvent(long time,
                EmuEventTarget target)

EmuEvent

public EmuEvent(long time,
                EmuEventTarget target,
                MovableObject obj)
Method Detail

init

public void init(long time)

init

public void init(long time,
                 EmuEventTarget target)

setEID

public void setEID(long eid)

clearEID

public void clearEID()

saveStackTrace

protected void saveStackTrace()

setTime

public void setTime(long time)

getTime

public long getTime()

getObject

public MovableObject getObject()

getTarget

public EmuEventTarget getTarget()

getSource

public Throwable getSource()

toString

public String toString()
Used to display the contents of the event.

Overrides:
toString in class Object

compareTo

public final int compareTo(Object obj)
Specified by:
compareTo in interface Comparable

getEID

public long getEID()

setNext

public void setNext(EmuEvent next)

getNext

public EmuEvent getNext()

setIThread

public void setIThread(boolean iThread)

getIThread

public boolean getIThread()

getDebugString

public String getDebugString()


Copyright © 2013. All Rights Reserved.