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
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
FieldsModifier and TypeFieldDescriptionprotected final TChunk to be printed by this printer.static final charstatic final charstatic final charstatic final charstatic final charstatic final charstatic final charstatic final char -
Constructor Summary
ConstructorsConstructorDescriptionTemplateCompactPrinter(CssTree tree, T chunk) Create a template printer for a given chunk. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, runPassMethods inherited from class com.google.common.css.compiler.passes.CodePrinter
getOutputBuffer, resetBuffer, setPreserveMarkedComments, visit
-
Field Details
-
REFERENCE_START
public static final char REFERENCE_START- See Also:
-
REFERENCE_END
public static final char REFERENCE_END- See Also:
-
REFERENCE_START_OLD
public static final char REFERENCE_START_OLD- See Also:
-
REFERENCE_END_OLD
public static final char REFERENCE_END_OLD- See Also:
-
DECLARATION_START
public static final char DECLARATION_START- See Also:
-
DECLARATION_END
public static final char DECLARATION_END- See Also:
-
RULE_START
public static final char RULE_START- See Also:
-
RULE_END
public static final char RULE_END- See Also:
-
chunk
Chunk to be printed by this printer.
-
-
Constructor Details
-
TemplateCompactPrinter
Create a template printer for a given chunk.- Parameters:
tree- CSS AST to be printed (with regard to a selected chunk)chunk- the chunk selected for printing
-
-
Method Details
-
createVisitor
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
-