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 void
event(DebugEvent event)
Append a string representation of the event to the current set of messages.java.lang.String
getMessages()
Get the messages recorded so far.void
message(java.lang.String message)
Append the message to the current set of messages.void
reset()
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:
event
in 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:
message
in interfaceDebugListener
- Parameters:
message
- The debug message.
-
reset
public void reset()
Clear the buffer.
-
-