|
JIVE Platform Release 0.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.buffalo.cse.jive.ui.search.AbstractJiveSearchQuery edu.buffalo.cse.jive.ui.search.ExecutionHistorySearchQuery edu.buffalo.cse.jive.ui.search.queries.VariableChangedSearchQuery
public class VariableChangedSearchQuery
An IJiveSearchQuery
that is used to check where a variable has
changed and also when a condition on the new value holds. The query is
capable of checking for variable changes on a single instance or over all
instances of a class (if an instance number is not provided).
Nested Class Summary | |
---|---|
protected class |
VariableChangedSearchQuery.AssignEventExporter
An exporter used to examine AssignEvent s and to determine if the
event is an assignment to a variable represented by a
JiveSearchPattern . |
Field Summary | |
---|---|
protected VariableChangedSearchQuery.AssignEventExporter |
exporter
An exporter used to examine AssignEvent s. |
protected RelationalOperator |
operator
A relational operator for a condition on the variable value. |
protected JiveSearchPattern |
pattern
A search pattern for the variable change. |
protected String |
rightValue
A value to be used on the right side of the operator. |
Constructor Summary | |
---|---|
VariableChangedSearchQuery(JiveSearchPattern pattern,
RelationalOperator operator,
String value)
Constructs a new search query with the supplied pattern, relational operator, and optional value. |
Method Summary | |
---|---|
protected boolean |
checkForMatch(AssignEvent event)
Checks if the supplied event matches the search pattern. |
ImageDescriptor |
getImageDescriptor()
Returns an ImageDescriptor used to represent the search query's
result in the Search view's 'Show Previous Searches' tool bar action. |
String |
getResultLabel(int matchCount)
Returns a label describing the search result used in the Search view. |
Class<? extends Object> |
getResultType()
Returns the type of search result matches collected by the search query. |
void |
visit(EventOccurrence event)
Visits an EventOccurrernce (other than a
MessageSend ). |
void |
visit(MessageSend event)
Visits an occurrence of a MessageSend event. |
Methods inherited from class edu.buffalo.cse.jive.ui.search.ExecutionHistorySearchQuery |
---|
addMatch, performSearch |
Methods inherited from class edu.buffalo.cse.jive.ui.search.AbstractJiveSearchQuery |
---|
canRerun, canRunInBackground, createSearchResult, getLabel, getSearchResult, run |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected VariableChangedSearchQuery.AssignEventExporter exporter
AssignEvent
s.
protected JiveSearchPattern pattern
protected RelationalOperator operator
protected String rightValue
Constructor Detail |
---|
public VariableChangedSearchQuery(JiveSearchPattern pattern, RelationalOperator operator, String value)
pattern
- the search patternoperator
- the relational operatorvalue
- the right operandMethod Detail |
---|
public Class<? extends Object> getResultType()
IJiveSearchQuery
NOTE: This will be changed in the future. For now, return Event.class for a result containing matches of mixed event types or return the specific class literal for a result containing matches of a single event type (e.g., AssignEvent.class).
getResultType
in interface IJiveSearchQuery
getResultType
in class ExecutionHistorySearchQuery
public String getResultLabel(int matchCount)
IJiveSearchQuery
matchCount
- the number of matches thus far
public ImageDescriptor getImageDescriptor()
IJiveSearchQuery
ImageDescriptor
used to represent the search query's
result in the Search view's 'Show Previous Searches' tool bar action.
public void visit(EventOccurrence event)
SequenceModel.EventVisitor
EventOccurrernce
(other than a
MessageSend
).
event
- the event occurrence being visitedpublic void visit(MessageSend event)
SequenceModel.EventVisitor
MessageSend
event.
event
- the message send being visitedprotected boolean checkForMatch(AssignEvent event)
event
- the assign event
true
if the event matches the pattern,
false
otherwise
|
JIVE Platform Release 0.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |