Package com.floreysoft.jmte.token

Examples of com.floreysoft.jmte.token.StringToken


            context.push(token3);
            try {
              if ((Boolean) token3.evaluate(context)) {

                // ${item2.property1}
                buffer.append(new StringToken(Arrays
                    .asList(new String[] { "item2",
                        "property1" }),
                    "item.property1").evaluate(context));

                // INNER_SUFFIX
View Full Code Here


    try {
      while (token1.iterator().hasNext()) {
        context.model.put(token1.getVarName(), token1.advance());
        addSpecialVariables(token1, context.model);

        buffer.append(new StringToken(Arrays.asList(new String[] {
            "item", "property1" }), "item.property1")
            .evaluate(context));

        if (!token1.isLast()) {
          buffer.append(token1.getSeparator());
View Full Code Here

  protected String transformCompiled(TemplateContext context) {
    StringBuilder buffer = new StringBuilder();

    buffer.append("PREFIX");

    buffer.append(new StringToken("address", "address", "NIX", "<h1>",
        "</h1>", "long", "full").evaluate(context));

    buffer.append("SUFFIX");

    return buffer.toString();
View Full Code Here

  @Override
  protected String transformCompiled(TemplateContext context) {
    StringBuilder buffer = new StringBuilder();

    buffer.append(new StringToken("address", "address", null, null, null,
        null, null).evaluate(context));

    return buffer.toString();
  }
View Full Code Here

      PlainTextToken plainTextToken = (PlainTextToken) token;
      tokenStream.consume();
      String text = plainTextToken.getText();
      codeGenerateText(text);
    } else if (token instanceof StringToken) {
      StringToken stringToken = (StringToken) token;
      tokenStream.consume();
      String variableName = stringToken.getExpression();
      addUsedVariableIfNotLocal(variableName);
      codeGenerateStringToken(stringToken);
    } else if (token instanceof ForEachToken) {
      foreach();
    } else if (token instanceof IfToken) {
View Full Code Here

  @Override
  protected String transformCompiled(TemplateContext context) {
    StringBuilder buffer = new StringBuilder();

    buffer.append(new StringToken("address", "address", "NIX", "<h1>",
        "</h1>", "long", "full").evaluate(context));

    return buffer.toString();
  }
View Full Code Here

        "trueCond" }), "bean.trueCond", true);

    context.push(token1);
    try {
      if ((Boolean) token1.evaluate(context)) {
        buffer.append(new StringToken("address", "address", null, null,
            null, null, null).evaluate(context));
      } else {
        buffer.append("NIX");
      }
    } finally {
View Full Code Here

        false);

    context.push(token1);
    try {
      if ((Boolean) token1.evaluate(context)) {
        buffer.append(new StringToken("address", "address", null, null,
            null, null, null).evaluate(context));
      } else {
        buffer.append("NIX");
      }
    } finally {
View Full Code Here

TOP

Related Classes of com.floreysoft.jmte.token.StringToken

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.