Class CodePrinter

    • Method Detail

      • createVisitor

        protected abstract CssTreeVisitor createVisitor​(VisitController visitController,
                                                        CodeBuffer codeBuffer)
        Constructs the visitor required by the subclass. This visitor's enter* methods will be called after the source map generator's startSourceMapping method and before its endSourceMapping method.
      • visit

        protected final void visit()
      • resetBuffer

        protected final void resetBuffer()
      • getOutputBuffer

        protected final java.lang.String getOutputBuffer()
      • setPreserveMarkedComments

        public void setPreserveMarkedComments​(boolean preserveMarkedComments)
        Whether special comments in the CSS nodes are preserved in the printed output. Currently supported special comments are annotated with one of the following:
        • @preserve
        • @license
        • /*! (start of comment)
        Comments marked with @license will cause a special "END OF LICENSED CSS FILE" comment to be inserted when the parser moves on to a new source file. Note that some optimizations may move pieces around, so there's no guarantees the licensed file will remain entirely intact.

        Note: Comments layout is not guaranteed, since detailed position information in the input files is not preserved by the parser.