|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@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.
SequenceTypeVisitor
,
SequenceValueScanner
Method Summary | ||
---|---|---|
|
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 |
---|
<P> void scan(TypeVisitableSequence<?> sequence, SequenceTypeVisitor<P> visitor, P argument)
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.
P
- The type of the additional parameter to required by
visitor
. Use Void
for visitors that
do not need an additional parameter.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
.
NullPointerException
- If sequence
or visitor
are null.
|
Gunni Rode / rode.dk | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |