JIVE Platform
Release 0.2.2

edu.buffalo.cse.jive.ui.search.queries
Class MethodReturnedSearchQuery.ReturnEventExporter

java.lang.Object
  extended by edu.buffalo.cse.jive.ui.search.queries.MethodReturnedSearchQuery.ReturnEventExporter
All Implemented Interfaces:
Event.Exporter, ReturnEvent.Exporter
Enclosing class:
MethodReturnedSearchQuery

protected class MethodReturnedSearchQuery.ReturnEventExporter
extends Object
implements ReturnEvent.Exporter

An exporter used to examine ReturnEvents and to determine if the event is a return from a method represented by a JiveSearchPattern.


Field Summary
protected  Value leftValue
          The return value used as the left operand of the condition.
protected  ReturnEvent.Returner returner
          The method that returned.
 
Constructor Summary
protected MethodReturnedSearchQuery.ReturnEventExporter()
           
 
Method Summary
 void addNumber(long n)
          Get the sequence number of this event.
 void addPreviousContext(ReturnEvent.Returner returner)
          Adds the previous context.
 void addReturnValue(Value value)
          Adds the value returned from the method.
 void addThreadID(ThreadID thread)
          Adds the thread on which this event took place.
 boolean checkForMatch(JiveSearchPattern pattern, RelationalOperator operator, String rightValue)
          Returns whether the event is a method return represented by the supplied JiveSearchPattern and whether the return value condition holds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

returner

protected ReturnEvent.Returner returner
The method that returned.


leftValue

protected Value leftValue
The return value used as the left operand of the condition.

Constructor Detail

MethodReturnedSearchQuery.ReturnEventExporter

protected MethodReturnedSearchQuery.ReturnEventExporter()
Method Detail

addPreviousContext

public void addPreviousContext(ReturnEvent.Returner returner)
Description copied from interface: ReturnEvent.Exporter
Adds the previous context. This method is called by ReturnEvent#export(Exporter).

Specified by:
addPreviousContext in interface ReturnEvent.Exporter
Parameters:
returner - the previous context

addReturnValue

public void addReturnValue(Value value)
Description copied from interface: ReturnEvent.Exporter
Adds the value returned from the method. This is called by ReturnEvent#export(Exporter).

Specified by:
addReturnValue in interface ReturnEvent.Exporter
Parameters:
value - the return value

addNumber

public void addNumber(long n)
Description copied from interface: Event.Exporter
Get the sequence number of this event. Each event has a unique sequence number with respect to a single execution.

Specified by:
addNumber in interface Event.Exporter
Parameters:
n - the event number

addThreadID

public void addThreadID(ThreadID thread)
Description copied from interface: Event.Exporter
Adds the thread on which this event took place.

Specified by:
addThreadID in interface Event.Exporter
Parameters:
thread - the thread identifier

checkForMatch

public boolean checkForMatch(JiveSearchPattern pattern,
                             RelationalOperator operator,
                             String rightValue)
Returns whether the event is a method return represented by the supplied JiveSearchPattern and whether the return value condition holds.

Parameters:
pattern - the pattern to check against
operator - the relational operator for the return value condition
rightValue - the right operand
Returns:
true if the method return can be associated with the pattern and the condition holds, false otherwise

JIVE Platform
Release 0.2.2