Class PassUtil
- java.lang.Object
-
- com.google.common.css.compiler.passes.PassUtil
-
public class PassUtil extends java.lang.ObjectUtility methods that can be useful for compiler passes.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringALTERNATEAnnotation 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 booleanhasAlternateAnnotation(CssNode node)Returns whether the ALTERNATE comment has been found among the comments of the node.static java.lang.StringprettyPrintSelector(CssSelectorNode selector)Prints a selector including the combinators and refiners but without a block behind with the pretty printer.static java.lang.StringprintSelector(CssSelectorNode selector)Prints a selector including the combinators and refiners but without a block behind with the compact printer.static java.lang.StringprintSelectorList(CssSelectorListNode selectorList)Prints a list of selector including the combinators and refiners but without a block behind with the compact printer.
-
-
-
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.
-
-