Class AbstractVisitor

java.lang.Object
com.aquima.interactions.composer.model.AbstractVisitor
All Implemented Interfaces:
IVisitor
Direct Known Subclasses:
RuntimeKeyGenerator

public abstract class AbstractVisitor extends Object implements IVisitor
Base class for visitors that splits the generic accept method into more specific accept methods for each type of element.

Note: The acceptCustomElement will always be called for all elements. This is done as custom elements may extend a normal element (for instance a custom button implementation). If the acceptCustomElement returns null, the element is considered a normal element, and the normal accept method for the element will be invoked.

Since:
5.0
Author:
O. Kerpershoek
  • Constructor Details

    • AbstractVisitor

      public AbstractVisitor()
  • Method Details

    • acceptButton

      protected abstract void acceptButton(IButton button)
    • acceptField

      protected abstract void acceptField(IField field)
    • acceptText

      protected abstract void acceptText(IAsset text)
    • acceptImage

      protected abstract void acceptImage(IImage image)
    • acceptPage

      protected abstract IVisitor acceptPage(IPage page)
    • acceptContainer

      protected abstract IVisitor acceptContainer(IContainer container)
    • acceptCustomElement

      protected abstract IVisitor acceptCustomElement(IElement element)
    • acceptDocument

      public abstract IVisitor acceptDocument(IDocument document)
    • accept

      public IVisitor accept(IElement element)
      Description copied from interface: IVisitor
      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.
      Specified by:
      accept in interface IVisitor
      Parameters:
      element - The current element that is encountered by the visitor.
      Returns:
      A visitor that should be used to process child elements.