001/* Interface for debug events.
002
003 Copyright (c) 2000-2014 The Regents of the University of California.
004 All rights reserved.
005 Permission is hereby granted, without written agreement and without
006 license or royalty fees, to use, copy, modify, and distribute this
007 software and its documentation for any purpose, provided that the above
008 copyright notice and the following two paragraphs appear in all copies
009 of this software.
010
011 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
012 FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
013 ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
014 THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
015 SUCH DAMAGE.
016
017 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
018 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
019 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
020 PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
021 CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
022 ENHANCEMENTS, OR MODIFICATIONS.
023
024 PT_COPYRIGHT_VERSION_2
025 COPYRIGHTENDKEY
026
027 */
028package ptolemy.kernel.util;
029
030///////////////////////////////////////////////////////////////////
031//// DebugEvent
032
033/**
034 An interface for events that can be used for debugging.  These events will
035 generally be subclassed to create events with more meaning (such as
036 a FiringEvent).  Debug events should always have a useful string
037 representation, so that the generic listeners (such as StreamListener)
038 can display them reasonably.  This string representation should be
039 provided by the toString() method.
040
041 @author  Steve Neuendorffer
042 @version $Id$
043 @since Ptolemy II 1.0
044 @Pt.ProposedRating Green (neuendor)
045 @Pt.AcceptedRating Green (neuendor)
046 @see DebugListener
047 @see Debuggable
048 @see ptolemy.actor.FiringEvent
049 */
050public interface DebugEvent {
051    ///////////////////////////////////////////////////////////////////
052    ////                         public methods                    ////
053
054    /** Return the source of the event.
055     *  @return The ptolemy object that published this event.
056     */
057    public NamedObj getSource();
058
059    /** Return a string representation of this event.
060     *  @return A user-readable string describing the event.
061     */
062    @Override
063    public String toString();
064}