Interface IVisitor

All Known Implementing Classes:
AbstractVisitor, ActivateInstanceVisitor, ActiveInstanceVisitor, CallbackVisitor, ElementFinderVisitor, EventValueConverter, EventValueValidator, QRCodeVisitor, ReadOnlyPageFieldValidator, RuntimeKeyGenerator, UpdateCustomFieldVisitor, UpdateFieldVisitor

public interface IVisitor

Interface for an element visitor.

Since:
5.0
Author:
O. Kerpershoek
  • Method Summary

    Modifier and Type
    Method
    Description
    accept(IElement element)
    This method will be invoked for each element that is encountered during the visit.
    void
    leave(ICompositeElement compositeElement, IVisitor childVisitor)
    This method will be invoked after all the children of the specified container have been processed with the childVisitor.
  • Method Details

    • accept

      IVisitor accept(IElement element)
      This method will be invoked for each element that is encountered during the visit. The return type of this method is the visitor that should be used to process the child elements of the current element. When the current element does not have any children, or when the child elements should not be processed, this method should return a null value as result. The returned visitor may either be a new visitor, for instance with specific context information for the element, or the same visitor.
      Parameters:
      element - The current element that is encountered by the visitor.
      Returns:
      A visitor that should be used to process child elements.
      Throws:
      AppException - This exception may be thrown by the visitor.
    • leave

      void leave(ICompositeElement compositeElement, IVisitor childVisitor)
      This method will be invoked after all the children of the specified container have been processed with the childVisitor. The implementation of this method may choose to merge the results of the child visitor with this visitor.
      Parameters:
      compositeElement - The container of whom the child visitor has completed.
      childVisitor - The child visitor that was used to evaluate the children of the container.
      Throws:
      AppException - This exception may be thrown by the visitor.