Class DelegatingVisitor


  • public class DelegatingVisitor
    extends java.lang.Object
    Dispatches to multiple CssTreeVisitors. All enter* methods are called in the order provided to the constructor and all leave* methods are called in the opposite order.

    Because enter* methods' return value changes the visitor behavior, the value returned by the last delegate is the one returned by the method.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static CssTreeVisitor from​(CssTreeVisitor... visitors)
      Creates a DelegatingVisitor from the given array of visitors.
      static CssTreeVisitor from​(java.util.List<CssTreeVisitor> originalVisitors)
      Creates a DelegatingVisitor from the given list of visitors.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • from

        public static CssTreeVisitor from​(java.util.List<CssTreeVisitor> originalVisitors)
        Creates a DelegatingVisitor from the given list of visitors. The list must have at least one element.
      • from

        public static CssTreeVisitor from​(CssTreeVisitor... visitors)
        Creates a DelegatingVisitor from the given array of visitors. Changes to the array will not be reflected after construction.