Class TemplateCompactPrinter<T>
- java.lang.Object
-
- com.google.common.css.compiler.passes.CodePrinter
-
- com.google.common.css.compiler.passes.CompactPrinter
-
- com.google.common.css.compiler.passes.TemplateCompactPrinter<T>
-
- Type Parameters:
T- type of chunk id objects
- All Implemented Interfaces:
CssCompilerPass
public class TemplateCompactPrinter<T> extends CompactPrinter
Printer for templates, which outputs GSS with holes to be filled for references. In addition, the declaration boundaries are explicitly noted, so that a declaration can be removed if it ends up empty.
-
-
Field Summary
Fields Modifier and Type Field Description protected TchunkChunk to be printed by this printer.static charDECLARATION_ENDstatic charDECLARATION_STARTstatic charREFERENCE_ENDstatic charREFERENCE_END_OLDstatic charREFERENCE_STARTstatic charREFERENCE_START_OLDstatic charRULE_ENDstatic charRULE_START
-
Constructor Summary
Constructors Constructor Description TemplateCompactPrinter(CssTree tree, T chunk)Create a template printer for a given chunk.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CssTreeVisitorcreateVisitor(VisitController visitController, CodeBuffer buffer)Constructs the visitor required by the subclass.-
Methods inherited from class com.google.common.css.compiler.passes.CompactPrinter
getCompactPrintedString, printCompactly, printCompactly, runPass
-
Methods inherited from class com.google.common.css.compiler.passes.CodePrinter
getOutputBuffer, resetBuffer, setPreserveMarkedComments, visit
-
-
-
-
Field Detail
-
REFERENCE_START
public static final char REFERENCE_START
- See Also:
- Constant Field Values
-
REFERENCE_END
public static final char REFERENCE_END
- See Also:
- Constant Field Values
-
REFERENCE_START_OLD
public static final char REFERENCE_START_OLD
- See Also:
- Constant Field Values
-
REFERENCE_END_OLD
public static final char REFERENCE_END_OLD
- See Also:
- Constant Field Values
-
DECLARATION_START
public static final char DECLARATION_START
- See Also:
- Constant Field Values
-
DECLARATION_END
public static final char DECLARATION_END
- See Also:
- Constant Field Values
-
RULE_START
public static final char RULE_START
- See Also:
- Constant Field Values
-
RULE_END
public static final char RULE_END
- See Also:
- Constant Field Values
-
chunk
protected final T chunk
Chunk to be printed by this printer.
-
-
Method Detail
-
createVisitor
protected CssTreeVisitor createVisitor(VisitController visitController, CodeBuffer buffer)
Description copied from class:CodePrinterConstructs the visitor required by the subclass. This visitor'senter*methods will be called after the source map generator'sstartSourceMappingmethod and before itsendSourceMappingmethod.- Overrides:
createVisitorin classCompactPrinter
-
-