Package ptolemy.domains.metroII.kernel
Class MetroIIDebugger
- java.lang.Object
-
- ptolemy.domains.metroII.kernel.MetroIIDebugger
-
- All Implemented Interfaces:
java.lang.Cloneable
public class MetroIIDebugger extends java.lang.Object implements java.lang.Cloneable
MetroDebugger is a debugging facility for MetroII directors. It enables printing information in a customized format.- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- Liangpeng Guo
- Pt.AcceptedRating:
- Red (glp)
- Pt.ProposedRating:
- Red (glp)
-
-
Constructor Summary
Constructors Constructor Description MetroIIDebugger()
Constructs a MetroDebugger with no info printed by default.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetroIIDebugger
clone()
Clones a MetroDebugger.boolean
debugging()
Returns whether debugging info is being printed.void
printMetroEvent(metroIIcomm.Event.Builder event)
Prints out the details of a MetroII event.void
printMetroEvents(java.lang.Iterable<metroIIcomm.Event.Builder> metroIIEventList)
Prints out the details of a list of MetroII events.void
printNotifiedMetroEvents(java.lang.Iterable<metroIIcomm.Event.Builder> metroIIEventList)
Prints out the details of notified events in a list.void
printText(java.lang.String text)
Prints out text.void
printTitle(java.lang.String title)
Prints out a title.void
setPrefix(java.lang.String prefix)
Sets the string to be printed out at the beginning of each line.void
turnOffDebugging()
Turns off printing debugging info.void
turnOnDebugging()
Turns on printing debugging info.
-
-
-
Method Detail
-
clone
public MetroIIDebugger clone() throws java.lang.CloneNotSupportedException
Clones a MetroDebugger.- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
- the object's class does not implement the Cloneable interface.
-
setPrefix
public void setPrefix(java.lang.String prefix)
Sets the string to be printed out at the beginning of each line.- Parameters:
prefix
- prefix string of each line .
-
debugging
public boolean debugging()
Returns whether debugging info is being printed.- Returns:
- whether debugging info is being printed.
-
turnOnDebugging
public void turnOnDebugging()
Turns on printing debugging info.
-
turnOffDebugging
public void turnOffDebugging()
Turns off printing debugging info.
-
printTitle
public void printTitle(java.lang.String title)
Prints out a title.- Parameters:
title
- the title to be printed out.
-
printText
public void printText(java.lang.String text)
Prints out text.- Parameters:
text
- the text to be printed out.
-
printMetroEvent
public void printMetroEvent(metroIIcomm.Event.Builder event)
Prints out the details of a MetroII event.- Parameters:
event
- the event to be printed out.
-
printMetroEvents
public void printMetroEvents(java.lang.Iterable<metroIIcomm.Event.Builder> metroIIEventList)
Prints out the details of a list of MetroII events.- Parameters:
metroIIEventList
- the event list.
-
printNotifiedMetroEvents
public void printNotifiedMetroEvents(java.lang.Iterable<metroIIcomm.Event.Builder> metroIIEventList)
Prints out the details of notified events in a list.- Parameters:
metroIIEventList
- the event list.
-
-