Package com.github.mustachejava.codes

Examples of com.github.mustachejava.codes.IterableCode


            "{{/parse}}";
    DefaultMustacheFactory mf = new DefaultMustacheFactory() {
      public MustacheVisitor createMustacheVisitor() {
        return new DefaultMustacheVisitor(this) {
          public void iterable(final TemplateContext templateContext, String variable, Mustache mustache) {
            list.add(new IterableCode(templateContext, df, mustache, variable) {
              Binding binding = oh.createBinding("params", templateContext, this);
              protected Writer handleFunction(Writer writer, Function function, Object[] scopes) {
                return super.handleFunction(writer, function, addScope(scopes, binding.get(scopes)));
              }
            });
View Full Code Here


    return new DefaultMustache(templateContext, df, list.toArray(new Code[list.size()]), templateContext.file());
  }

  @Override
  public void iterable(TemplateContext templateContext, String variable, Mustache mustache) {
    list.add(new IterableCode(templateContext, df, mustache, variable));
  }
View Full Code Here

    return new DefaultMustache(templateContext, df, list.toArray(new Code[list.size()]), templateContext.file());
  }

  @Override
  public void iterable(TemplateContext templateContext, String variable, Mustache mustache) {
    list.add(new IterableCode(templateContext, df, mustache, variable));
  }
View Full Code Here

TOP

Related Classes of com.github.mustachejava.codes.IterableCode

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.