ptolemy.domains.ptera.kernel
Class PteraDebugEvent

java.lang.Object
  extended by ptolemy.domains.ptera.kernel.PteraDebugEvent
All Implemented Interfaces:
DebugEvent
Direct Known Subclasses:
PteraErrorEvent

public class PteraDebugEvent
extends java.lang.Object
implements DebugEvent

A debug event for Ptera models.

Since:
Ptolemy II 8.0
Version:
$Id: PteraDebugEvent.java 57044 2010-01-27 22:41:05Z cxh $
Author:
Thomas Huining Feng
Accepted Rating:
Red (tfeng)
Proposed Rating:
Yellow (tfeng)

Field Summary
private  java.lang.String _message
          The message.
private  NamedObj _source
          The source.
 
Constructor Summary
PteraDebugEvent(NamedObj source, java.lang.String message)
          Construct a debug event with the source and a message.
 
Method Summary
 NamedObj getSource()
          Return the source of the debug event.
 java.lang.String toString()
          Return the message.
 java.lang.String toString(NamedObj sourceContainer)
          Return a string that includes both the name of the source (within the given container) and the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_message

private java.lang.String _message
The message.


_source

private NamedObj _source
The source.

Constructor Detail

PteraDebugEvent

public PteraDebugEvent(NamedObj source,
                       java.lang.String message)
Construct a debug event with the source and a message.

Parameters:
source - The source of the debug event.
message - The message.
Method Detail

getSource

public NamedObj getSource()
Return the source of the debug event.

Specified by:
getSource in interface DebugEvent
Returns:
The source.

toString

public java.lang.String toString()
Return the message.

Specified by:
toString in interface DebugEvent
Overrides:
toString in class java.lang.Object
Returns:
The message.

toString

public java.lang.String toString(NamedObj sourceContainer)
Return a string that includes both the name of the source (within the given container) and the message.

Parameters:
sourceContainer - Container of the source that is used to retrieve part of the full name of the source.
Returns:
The string.