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

dk.rode.thesis.visitor
Interface SequenceTypeVisitor<P>

Type Parameters:
P - The type of the additional parameter to this visitor's methods. Use Void for visitors that do not need an additional parameter.
All Superinterfaces:
SequenceVisitor<P>
All Known Implementing Classes:
LoggingVisitor, TypeVisitor

@Participant(value="Visitor")
public interface SequenceTypeVisitor<P>
extends SequenceVisitor<P>

A sequence type visitor visits a sequence based on its actual type, for example ReversibleSequence or MemorizableSequence.

Implementation notes:
An actual visitor implementation of this interface may not be able to visit decorated, adapted, or proxied sequences, because the instanceof test will fail in such cases. Such sequences will thus use the SequenceVisitor.visitUnknown(Sequence, Object) visitation method.

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

Method Summary
 void visitComposite(CompositeSequence<?> sequence, P argument)
          Visits a composite sequence.
 void visitMemorizable(MemorizableSequence<?> sequence, P argument)
          Visits a memorizable sequence.
 void visitObservable(ObservableSequence<?,?,?> sequence, P argument)
          Visits an observable sequence.
 void visitReversible(ReversibleSequence<?> sequence, P argument)
          Visits a reversible sequence.
 void visitStateable(StateableSequence<?> sequence, P argument)
          Visits a stateable sequence.
 
Methods inherited from interface dk.rode.thesis.visitor.SequenceVisitor
visitUnknown
 

Method Detail

visitComposite

void visitComposite(CompositeSequence<?> sequence,
                    P argument)
Visits a composite sequence.

Parameters:
sequence - The composite sequence to visit; never null.
argument - A visitor-specified argument, if any; nullability determined by the visitor implementation.

visitMemorizable

void visitMemorizable(MemorizableSequence<?> sequence,
                      P argument)
Visits a memorizable sequence.

Parameters:
sequence - The memorizable sequence to visit; never null.
argument - A visitor-specified argument, if any; nullability determined by the visitor implementation.

visitObservable

void visitObservable(ObservableSequence<?,?,?> sequence,
                     P argument)
Visits an observable sequence.

Parameters:
sequence - The observable sequence to visit; never null.
argument - A visitor-specified argument, if any; nullability determined by the visitor implementation.

visitReversible

void visitReversible(ReversibleSequence<?> sequence,
                     P argument)
Visits a reversible sequence.

Parameters:
sequence - The reversible sequence to visit; never null.
argument - A visitor-specified argument, if any; nullability determined by the visitor implementation.

visitStateable

void visitStateable(StateableSequence<?> sequence,
                    P argument)
Visits a stateable sequence.

Parameters:
sequence - The stateable sequence to visit; never null.
argument - A visitor-specified argument, if any; nullability determined by the visitor implementation.

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.