Package net.sf.laja.template

Examples of net.sf.laja.template.Template


    if (value != null && value.startsWith("'") && value.endsWith("'")) {
      value = "\"" + value.substring(1, value.length()-1) + "\"";
    }
    String statement = "#set (" + attributeName + "=" + value + ")";
    try {
      Template template = Laja.parseStatement(statement, templateTextWriter, namespaces, classes, groovyClassLoader);
      template.generate();
    } catch (RuntimeException e) {
      System.out.println("Could not set value: " + statement);
    }
  }
View Full Code Here


   * @param classes alll classes loaded by Groovy.
   * @param groovyClassLoader Groovy class loader
   * @return the loaded and parsed template
   */
   public static Template parserFile(String systemImportsFilename, String templateFilename, Namespaces namespaces, TemplateTextWriter templateTextWriter, Classes classes, GroovyClassLoader groovyClassLoader) {
    Template template = parseFile(templateFilename, templateTextWriter, namespaces, classes, groovyClassLoader);
    template.insertSystemImportsAsFirstStatement(systemImportsFilename);
   
    return template;
  }
View Full Code Here

TOP

Related Classes of net.sf.laja.template.Template

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.