edu.washington.cs.supple.trace
Class Trace

java.lang.Object
  extended byedu.washington.cs.supple.trace.Trace
All Implemented Interfaces:
java.io.Serializable

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

Author:
kgajos To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments
See Also:
Serialized Form

Field Summary
protected  java.util.Hashtable currentTrails
           
protected  Trail lastTrail
           
protected  java.util.Vector trails
           
 
Constructor Summary
Trace()
           
 
Method Summary
 void addTraceEvent(TraceEvent ev)
          Adds a trace event to a trail corresponding to the ui that generated the event
 java.lang.String dumpLast(int num)
           
protected  Trail ensureTrailFor(UiObject ui)
           
 Trail getCurrentTrail()
          Returns the most recently touched trail
 java.util.Iterator iterator()
          Returns an iterator over all trails
 java.util.Iterator iterator(UiObject ui)
          Returns an iterator over all trails pertaining to a given ui
 int size()
          Returns the number of tails in this trace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

trails

protected java.util.Vector trails

currentTrails

protected transient java.util.Hashtable currentTrails

lastTrail

protected Trail lastTrail
Constructor Detail

Trace

public Trace()
Method Detail

addTraceEvent

public void addTraceEvent(TraceEvent ev)
Adds a trace event to a trail corresponding to the ui that generated the event

Parameters:
ev - trace event

ensureTrailFor

protected Trail ensureTrailFor(UiObject ui)

dumpLast

public java.lang.String dumpLast(int num)
Parameters:
num -
Returns:

getCurrentTrail

public Trail getCurrentTrail()
Returns the most recently touched trail

Returns:
the most recently touched trail

size

public int size()
Returns the number of tails in this trace

Returns:

iterator

public java.util.Iterator iterator()
Returns an iterator over all trails

Returns:
the iterator

iterator

public java.util.Iterator iterator(UiObject ui)
Returns an iterator over all trails pertaining to a given ui

Parameters:
ui - root of a ui in question
Returns:
the iterator