Class PassUtil


  • public class PassUtil
    extends java.lang.Object
    Utility methods that can be useful for compiler passes.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ALTERNATE
      Annotation to explicitly state that several consecutive declarations are alternatives and it should be left up to the user agent to interpret whichever is appropriate.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean hasAlternateAnnotation​(CssNode node)
      Returns whether the ALTERNATE comment has been found among the comments of the node.
      static java.lang.String prettyPrintSelector​(CssSelectorNode selector)
      Prints a selector including the combinators and refiners but without a block behind with the pretty printer.
      static java.lang.String printSelector​(CssSelectorNode selector)
      Prints a selector including the combinators and refiners but without a block behind with the compact printer.
      static java.lang.String printSelectorList​(CssSelectorListNode selectorList)
      Prints a list of selector including the combinators and refiners but without a block behind with the compact printer.
      • Methods inherited from class java.lang.Object

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

      • ALTERNATE

        public static final java.lang.String ALTERNATE
        Annotation to explicitly state that several consecutive declarations are alternatives and it should be left up to the user agent to interpret whichever is appropriate. The annotation excludes the declarations from being treated as redundant.
        See Also:
        Constant Field Values
    • Method Detail

      • printSelector

        public static java.lang.String printSelector​(CssSelectorNode selector)
        Prints a selector including the combinators and refiners but without a block behind with the compact printer.
      • printSelectorList

        public static java.lang.String printSelectorList​(CssSelectorListNode selectorList)
        Prints a list of selector including the combinators and refiners but without a block behind with the compact printer.
      • prettyPrintSelector

        public static java.lang.String prettyPrintSelector​(CssSelectorNode selector)
        Prints a selector including the combinators and refiners but without a block behind with the pretty printer.
      • hasAlternateAnnotation

        public static boolean hasAlternateAnnotation​(CssNode node)
        Returns whether the ALTERNATE comment has been found among the comments of the node.