org.modeshape.jcr.query.model

## Class Visitors.NavigationVisitor

- java.lang.Object
- - org.modeshape.jcr.query.model.Visitors.NavigationVisitor

- All Implemented Interfaces:
    Visitor
  Direct Known Subclasses:
    Visitors.WalkAllVisitor
  Enclosing class:
    Visitors

      public abstract static class Visitors.NavigationVisitor
      extends Object
      implements Visitor

  An abstract visitor implementation that performs navigation of the query object.

  Subclasses should always implement the `visit(T object)` methods by performing the following actions:

  1. Call `strategy.visit(object);`
  2. Add any children of `object` that are to be visited using `enqueue(Visitable)`
  3. Call `visitNext()`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Visitor` | `strategy`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Visitors.NavigationVisitor(Visitor strategy)` Create a visitor that walks all query objects.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `enqueue(Iterable<? extends Visitable> objectsToBeVisited)`
    `protected void` | `enqueue(Visitable objectToBeVisited)`
    `protected void` | `visitNext()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.modeshape.jcr.query.model.Visitor

      `visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit`

- - ### Field Detail

    - #### strategy

          protected final Visitor strategy

  - ### Constructor Detail

    - #### Visitors.NavigationVisitor

          protected Visitors.NavigationVisitor(Visitor strategy)

      Create a visitor that walks all query objects.
      Parameters:
        `strategy` - the visitor that should be called at every node.

  - ### Method Detail

    - #### enqueue

          protected void enqueue(Visitable objectToBeVisited)

    - #### enqueue

          protected void enqueue(Iterable<? extends Visitable> objectsToBeVisited)

    - #### visitNext

          protected final void visitNext()

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.