Package com.firefly.template.parser

Examples of com.firefly.template.parser.ViewFileReader


  public static void main(String[] args) {
    String path = "F:/develop/workspace2/firefly-template/src/test/page";
//    String path = "/Users/qiupengtao/Documents/workspace/firefly-project/firefly-template/src/test/page";
    Config config = new Config();
    config.setViewPath(path);
    ViewFileReader reader = new ViewFileReader();
    reader.setConfig(config);
    reader.readAndBuild();
  }
View Full Code Here


      throw new IllegalArgumentException("template config is null");
   
    long start = System.currentTimeMillis();
    FunctionRegistry.add("dateFormat", new DateFormatFunction(config.getCharset()));
    FunctionRegistry.add("len", new LengthFunction(config.getCharset()));
    ViewFileReader reader = new ViewFileReader(config);
    List<String> javaFiles = reader.getJavaFiles();
    List<String> templateFiles = reader.getTemplateFiles();
    List<String> classNames = reader.getClassNames();
   
    for (int i = 0; i < javaFiles.size(); i++) {
      String c = javaFiles.get(i);
      final String classFileName = c.substring(0, c.length() - 4) + "class";
      ClassLoader classLoader = new TemplateClassLoader(classFileName, TemplateFactory.class.getClassLoader());
View Full Code Here

    FunctionRegistry.add("cut", new CutStringFunction(config.getCharset()));
    FunctionRegistry.add("escape", new XmlEscapeFunction(config.getCharset()));
    FunctionRegistry.add("remove", new RemoveAttributeFunction());
    FunctionRegistry.add("modOut", new ModuloOutputFunction(config.getCharset()));
   
    ViewFileReader reader = new ViewFileReader(config);
    List<String> javaFiles = reader.getJavaFiles();
    List<String> templateFiles = reader.getTemplateFiles();
    List<String> classNames = reader.getClassNames();
   
    for (int i = 0; i < javaFiles.size(); i++) {
      String c = javaFiles.get(i);
      final String classFileName = c.substring(0, c.length() - 4) + "class";
      ClassLoader classLoader = new TemplateClassLoader(classFileName, TemplateFactory.class.getClassLoader());
View Full Code Here

TOP

Related Classes of com.firefly.template.parser.ViewFileReader

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.