|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.core.algorithms.Tracer
A Tracer
object is the central object for the recording of
algorithms. It can be used to record many instances of objects that
can be identified via its names. The object instances are stored at
TraceObjects
, that allow fast access to a specific
recorded instance. Via the recording of defined record-steps -
in our terms called TraceLabels
- it is later
possible to scope through the various instances of all recorded objects at
these defined time points. To navigate easily through the recorded
TraceLabels
, one can use a TraceCursor
. To
mark algorithm classes that can record such debugging data, they should
implement the TraceExecutor
interface.
For easy recording and visualizing the recorded data, one should take
a look at the TraceBar
- a complete control bar to
browse through the recorded algorithm. The TraceVisualizer
interface
helps for simple visualization of the recorded data.
Constructor Summary | |
Tracer(java.lang.String name)
Default Constructor. |
Method Summary | |
TraceCursor |
createTraceCursor()
|
TraceObject |
createTraceObject(java.lang.String name)
Creates a new TraceObject with the given name.
|
TraceLabel[] |
getTraceLabels(int level)
|
int |
maxUsedLevel()
|
TraceObject |
object(java.lang.String name)
Returns the TraceObject with the given name. |
java.util.Enumeration |
objects()
Returns an enumeration of all recorded objects. |
int |
recLabelCount()
|
void |
recordLabel(java.lang.String name,
int level)
Records a new TraceLabel with the specified name and level. |
void |
recordLabel(java.lang.String name,
int type,
int level)
Records a new TraceLabel with the specified name, type and level. |
boolean |
recordMode()
Returns true , if the Tracer is recording an algorithm. |
void |
startRecord()
|
void |
stopRecord()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Tracer(java.lang.String name)
Method Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public TraceObject createTraceObject(java.lang.String name)
TraceObject
with the given name.
If a TraceObject
with the given name exists, then
this TraceObject
will be returned (otherwise
the newly created). New TraceObjects
may
only be created, if the Tracer
is in record mode.
The name must not be null
.name
- the name of the new TraceObject
TraceObject
public TraceObject object(java.lang.String name)
TraceObject
with the given name. If no
such TraceObject
exists, a new one will be created, but only
if the Tracer
is in record mode, otherwise null
will be returned.
The name must not be null
.name
- the name of the TraceObject
TraceObject
or a new createdpublic java.util.Enumeration objects()
public int recLabelCount()
public int maxUsedLevel()
public boolean recordMode()
true
, if the Tracer
is recording an algorithm.true
, if the Tracer
is recording an algorithm.public void startRecord()
public void stopRecord()
public void recordLabel(java.lang.String name, int type, int level)
TraceLabel
with the specified name, type and level.name
- the name of the new TraceLabel
type
- the type of the TraceLabel
level
- the level depth of the TraceLabel
public void recordLabel(java.lang.String name, int level)
TraceLabel
with the specified name and level.name
- the name of the new TraceLabel
level
- the level depth of the TraceLabel
public TraceLabel[] getTraceLabels(int level)
public TraceCursor createTraceCursor()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |