Class DelegatingVisitor

java.lang.Object
com.google.common.css.compiler.passes.DelegatingVisitor

public class DelegatingVisitor extends 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 Details

    • from

      public static CssTreeVisitor from(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.