Package com.google.clearsilver.jsilver.interpreter

Examples of com.google.clearsilver.jsilver.interpreter.OptimizerProvider


   * required for correctness.
   */
  private TemplateFactory setupOptimizerFactory(TemplateFactory templateFactory) {
    // DataCommandConsolidator saves state so we need to create a new one
    // every time we run it.
    OptimizerProvider dataCommandConsolidatorProvider = new OptimizerProvider() {
      public Switch getOptimizer() {
        return new DataCommandConsolidator();
      }
    };

    // SyntaxTreeOptimizer has no state so we can use the same object
    // concurrently, but it is cheap to make so lets be consistent.
    OptimizerProvider syntaxTreeOptimizerProvider = new OptimizerProvider() {
      public Switch getOptimizer() {
        return new SyntaxTreeOptimizer();
      }
    };

    OptimizerProvider stripStructuralWhitespaceProvider = null;
    if (options.getStripStructuralWhiteSpace()) {
      // StructuralWhitespaceStripper has state so create a new one each time.
      stripStructuralWhitespaceProvider = new OptimizerProvider() {
        public Switch getOptimizer() {
          return new StructuralWhitespaceStripper();
        }
      };
    }
View Full Code Here

TOP

Related Classes of com.google.clearsilver.jsilver.interpreter.OptimizerProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.