Evaluating Software Design Patterns
— the "Gang of Four" patterns implemented in Java 6

dk.rode.thesis.visitor
Interface SequenceValueScanner

All Known Implementing Classes:
SimpleScanner

@Participant(value="ObjectStructure")
public interface SequenceValueScanner

A sequence value scanner performs the actual traversal of the sequence structure to be visited by a value visitor, invoking the ValueVisitableSequence.accept(SequenceValueVisitor, Object) visitation method on each found value visitable sequence.

Non-visitable sequences are ignored, but ordinary composite sequences are still traversed.

Author:
Gunni Rode / rode.dk
See Also:
SequenceValueVisitor, SequenceTypeScanner

Method Summary
<P> void
scan(ValueVisitableSequence<?> sequence, SequenceValueVisitor<P> visitor, P argument)
          Performs the traversal of the sequence structure starting with sequence using the value visitor supplied as visitor.
 

Method Detail

scan

<P> void scan(ValueVisitableSequence<?> sequence,
              SequenceValueVisitor<P> visitor,
              P argument)
Performs the traversal of the sequence structure starting with sequence using the value visitor supplied as visitor. If sequence is non-composite, it will be the only sequence visited.

For each value visitable sequence found in the sequence structure, the ValueVisitableSequence.accept(SequenceValueVisitor, Object) visitation method is invoked.

Type Parameters:
P - The type of the additional parameter to required by visitor. Use Void for visitors that do not need an additional parameter.
Parameters:
sequence - The starting sequence ("root"); cannot be null.
visitor - The value visitor to use; cannot be null.
argument - A visitor specified argument, if any; nullability determined by visitor.
Throws:
NullPointerException - If sequence or visitor are null.

Gunni Rode / rode.dk

Feel free to use and/or modify the Java 6 source code developed for this thesis AT YOUR OWN RISK, but note that the source code comes WITHOUT ANY — and I do mean WITHOUT ANY — form of warranty WHAT SO EVER!

The original thesis and source code are available at rode.dk/thesis.