randoop
Class MultiVisitor
Object
MultiVisitor
- All Implemented Interfaces:
- ExecutionVisitor
public class MultiVisitor
extends Object
implements ExecutionVisitor
An execution visitor that chains a list of visitors in sequence. It can be
used if the user wants to use more than one visitor to visit a sequence
during execution.
When the visitBefore method is called on this visitor, it calls visitMethod
on each of the sub-visitors in the order in which the sub-visitors were given
when constructing this visitor.
When the visitAfter method is called on this visitor, it calls visitAfter on
each of the sub-visitors in turn, also in the order in which they were given
when constructing the visitor. If one of these calls returns false, this
visitor immediately returns false without calling visitAfter on the remaining
visitors.
Method Summary
void |
initialize(ExecutableSequence executableSequence)
Calls the initialize method for each of the visitors, in the
order in which the visitors were given during construction of
this MultiVisitor. |
void |
visitAfter(ExecutableSequence sequence,
int i)
Invoked by ExecutableSequence.execute after the i-th statement executes. |
void |
visitBefore(ExecutableSequence sequence,
int i)
Invoked by ExecutableSequence.execute before
the i-th statement executes. |
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
visitors
public final List<ExecutionVisitor> visitors
MultiVisitor
public MultiVisitor()
MultiVisitor
public MultiVisitor(List<ExecutionVisitor> visitors)
initialize
public void initialize(ExecutableSequence executableSequence)
- Calls the initialize method for each of the visitors, in the
order in which the visitors were given during construction of
this MultiVisitor.
- Specified by:
initialize in interface ExecutionVisitor
visitAfter
public void visitAfter(ExecutableSequence sequence,
int i)
- Description copied from interface:
ExecutionVisitor
- Invoked by ExecutableSequence.execute after the i-th statement executes.
Precondition: statements 0..i have been executed.
- Specified by:
visitAfter in interface ExecutionVisitor
visitBefore
public void visitBefore(ExecutableSequence sequence,
int i)
- Description copied from interface:
ExecutionVisitor
- Invoked by ExecutableSequence.execute before
the i-th statement executes.
Precondition: statements 0..i-1 have been executed.
- Specified by:
visitBefore in interface ExecutionVisitor