Package httl

Examples of httl.Node


    }
    return true;
  }

  public void visit(EndDirective node) throws IOException, ParseException {
    Node start = ((EndDirective) node).getStart();
    if (start instanceof IfDirective) {
      end((IfDirective) start);
    } else if (start instanceof ElseDirective) {
      end((ElseDirective) start);
    } else if (start instanceof ForDirective) {
View Full Code Here


   
    String methodCode = statusInit.toString() + declare + code;
    textFields.append("private static final " + Map.class.getName() + " $VARS = " + toTypeCode(defVariables, defVariableTypes) + ";\n");
   
    String templateName = resource.getName();
    Node macro = node;
    while (macro instanceof MacroDirective) {
      templateName += "#" + ((MacroDirective) macro).getName();
      macro = ((MacroDirective) macro).getParent();
    }
   
View Full Code Here

    String encoding = resource.getEncoding();
    Locale locale = resource.getLocale();
    long lastModified = resource.getLastModified();
    StringBuilder buf = new StringBuilder(name.length() + 40);
    buf.append(name);
    Node macro = node;
    while (macro instanceof MacroDirective) {
      buf.append("_");
      buf.append(((MacroDirective) macro).getName());
      macro = ((MacroDirective) macro).getParent();
    }
View Full Code Here

    String source = resource.getSource();
    try {
      if (templateFilter != null) {
        source = templateFilter.filter(resource.getName(), source);
      }
      Node root = templateParser.parse(source, 0);
      Map<String, Class<?>> parameterTypes = useRenderVariableType && args != null ? new DelegateMap<String, Class<?>>(new TypeMap(convertMap(args))) : null;
      Template template = translator.translate(resource, root, parameterTypes);
      if (logger != null && logger.isDebugEnabled()) {
        logger.debug("Parsed the template " + name + ", eslapsed: " + (System.currentTimeMillis() - start) + "ms.");
      }
View Full Code Here

TOP

Related Classes of httl.Node

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.