Interface ElementVisitor


public interface ElementVisitor
A visitor for elements. The visitor can for example be responsible to import all the visited elements into an underlying implementation of a document type.
Since:
4.0
  • Method Details

    • visitEnd

      void visitEnd()
      Called when the end of visit for this visitor is reached. That can for example be when all elements of an array element were processed.
    • visitNull

      void visitNull(@NonNull @NonNull NullElement entry)
      Visits a null element.
      Parameters:
      entry - the null element to visit.
      Throws:
      NullPointerException - if the given entry is null.
    • visitPrimitive

      void visitPrimitive(@NonNull @NonNull PrimitiveElement entry)
      Visits a primitive element.
      Parameters:
      entry - the primitive element to visit.
      Throws:
      NullPointerException - if the given entry is null.
    • visitArray

      Starts the visit of an array element. The returned element visitor is used to visit each entry of the array.
      Parameters:
      entry - the array element to visit.
      Returns:
      the visitor to apply to all array entries.
      Throws:
      NullPointerException - if the given entry is null.
    • visitObject

      Starts the visit of an object element. The returned element visitor is used to visit each key-value mapping of the object.
      Parameters:
      entry - the object element to visit.
      Returns:
      the visitor to apply to all object key-value mappings.
      Throws:
      NullPointerException - if the given entry is null.