Class AbstractVisitable

  • All Implemented Interfaces:
    Visitable
    Direct Known Subclasses:
    Element, Resource

    public abstract class AbstractVisitable
    extends java.lang.Object
    implements Visitable
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void accept​(byte[] value, java.lang.String elementName, Visitor visitor)  
      protected void accept​(Visitable visitable, java.lang.String elementName, Visitor visitor)  
      protected void accept​(java.lang.Boolean value, java.lang.String elementName, Visitor visitor)  
      protected void accept​(java.lang.Integer value, java.lang.String elementName, Visitor visitor)  
      abstract void accept​(java.lang.String elementName, int elementIndex, Visitor visitor)
      Accept a Visitor and invoke the appropriate visit methods.
      protected void accept​(java.lang.String value, java.lang.String elementName, Visitor visitor)  
      protected void accept​(java.math.BigDecimal value, java.lang.String elementName, Visitor visitor)  
      protected void accept​(java.time.LocalDate value, java.lang.String elementName, Visitor visitor)  
      protected void accept​(java.time.LocalTime value, java.lang.String elementName, Visitor visitor)  
      protected void accept​(java.time.temporal.TemporalAccessor temporal, java.lang.String elementName, Visitor visitor)  
      protected void accept​(java.time.YearMonth value, java.lang.String elementName, Visitor visitor)  
      protected void accept​(java.time.Year value, java.lang.String elementName, Visitor visitor)  
      protected void accept​(java.time.ZonedDateTime value, java.lang.String elementName, Visitor visitor)  
      protected void accept​(java.util.List<? extends Visitable> visitables, java.lang.String elementName, Visitor visitor, java.lang.Class<?> type)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AbstractVisitable

        public AbstractVisitable()
    • Method Detail

      • accept

        public abstract void accept​(java.lang.String elementName,
                                    int elementIndex,
                                    Visitor visitor)
        Description copied from interface: Visitable
        Accept a Visitor and invoke the appropriate visit methods. A typical implementation would look like this:
         if (visitor.preVisit(this)) {
             visitor.visitStart(elementName, elementIndex, this);
             if (visitor.visit(elementName, elementIndex, this)) {
                 // visit children
             }
             visitor.visitEnd(elementName, elementIndex, this);
             visitor.postVisit(this);
         }
         
        Specified by:
        accept in interface Visitable
        Parameters:
        elementName - the name of the element in the context of this visit
        elementIndex - the index of the element in a list or -1 if it is not contained within a List
        visitor - the visitor to use
      • accept

        protected void accept​(Visitable visitable,
                              java.lang.String elementName,
                              Visitor visitor)
      • accept

        protected void accept​(java.util.List<? extends Visitable> visitables,
                              java.lang.String elementName,
                              Visitor visitor,
                              java.lang.Class<?> type)
      • accept

        protected void accept​(java.math.BigDecimal value,
                              java.lang.String elementName,
                              Visitor visitor)
      • accept

        protected void accept​(byte[] value,
                              java.lang.String elementName,
                              Visitor visitor)
      • accept

        protected void accept​(java.lang.Integer value,
                              java.lang.String elementName,
                              Visitor visitor)
      • accept

        protected void accept​(java.time.LocalDate value,
                              java.lang.String elementName,
                              Visitor visitor)
      • accept

        protected void accept​(java.time.LocalTime value,
                              java.lang.String elementName,
                              Visitor visitor)
      • accept

        protected void accept​(java.lang.String value,
                              java.lang.String elementName,
                              Visitor visitor)
      • accept

        protected void accept​(java.lang.Boolean value,
                              java.lang.String elementName,
                              Visitor visitor)
      • accept

        protected void accept​(java.time.Year value,
                              java.lang.String elementName,
                              Visitor visitor)
      • accept

        protected void accept​(java.time.YearMonth value,
                              java.lang.String elementName,
                              Visitor visitor)
      • accept

        protected void accept​(java.time.ZonedDateTime value,
                              java.lang.String elementName,
                              Visitor visitor)
      • accept

        protected void accept​(java.time.temporal.TemporalAccessor temporal,
                              java.lang.String elementName,
                              Visitor visitor)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object