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

dk.rode.thesis.visitor
Interface SequenceTypeScanner

All Known Implementing Classes:
SimpleScanner

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

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

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

Author:
Gunni Rode / rode.dk
See Also:
SequenceTypeVisitor, SequenceValueScanner

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

Method Detail

scan

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

For each type visitable sequence found in the sequence structure, the TypeVisitableSequence.accept(SequenceTypeVisitor, 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 type 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.