Package ptolemy.kernel.util
Class RecorderListener
- java.lang.Object
-
- ptolemy.kernel.util.RecorderListener
-
- All Implemented Interfaces:
DebugListener
public class RecorderListener extends java.lang.Object implements DebugListener
A debug listener that records messages in a string buffer.- Since:
- Ptolemy II 0.3
- Version:
- $Id$
- Author:
- Edward A. Lee, Christopher Hylands
- See Also:
NamedObj,StreamListener- Pt.AcceptedRating:
- Green (cxh)
- Pt.ProposedRating:
- Green (eal)
-
-
Constructor Summary
Constructors Constructor Description RecorderListener()Create a listener.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidevent(DebugEvent event)Append a string representation of the event to the current set of messages.java.lang.StringgetMessages()Get the messages recorded so far.voidmessage(java.lang.String message)Append the message to the current set of messages.voidreset()Clear the buffer.
-
-
-
Method Detail
-
event
public void event(DebugEvent event)
Append a string representation of the event to the current set of messages.- Specified by:
eventin interfaceDebugListener- Parameters:
event- The event.
-
getMessages
public java.lang.String getMessages()
Get the messages recorded so far.- Returns:
- The messages recorded thus far.
-
message
public void message(java.lang.String message)
Append the message to the current set of messages. A newline is automatically appended to the message.- Specified by:
messagein interfaceDebugListener- Parameters:
message- The debug message.
-
reset
public void reset()
Clear the buffer.
-
-