com.gargoylesoftware.base.testing

Class EventCatcherRecord

public class EventCatcherRecord extends Object

Information about a single event that was caught by an EventCatcher

Version: $Revision: 1.3 $

Author: Mike Bowler

Field Summary
StringcallingThread_
EventObjectevent_
Methodmethod_
Constructor Summary
EventCatcherRecord(Method method, EventObject event)
Create a new Record
Method Summary
EventObjectgetEvent()
Return the event that had been caught.
MethodgetMethod()
Return the method that had been invoked with the specified event.
StringgetThreadName()
Return the name of the thread that the event was called on.

Field Detail

callingThread_

private final String callingThread_

event_

private final EventObject event_

method_

private final Method method_

Constructor Detail

EventCatcherRecord

public EventCatcherRecord(Method method, EventObject event)
Create a new Record

Parameters: method The method that caught the event. event The event that was caught.

Method Detail

getEvent

public EventObject getEvent()
Return the event that had been caught. For example, a WindowEvent

Returns: The event.

getMethod

public Method getMethod()
Return the method that had been invoked with the specified event. For example, if we had caught a WindowEvent then the method might be windowClosing()

Returns: The method

getThreadName

public String getThreadName()
Return the name of the thread that the event was called on. For AWT events, this will typically be the event dispatch (UI) thread.

Returns: The thread name.