Package com.google.template.soy.data

Examples of com.google.template.soy.data.SoyData.stringValue()


    // the let block is wrapped in SanitizedContent of the specified kind.
    // TODO: Consider adding mutable state to nodes that allows the contextual escaper to tag
    // nodes it has processed, and assert presence of this tag here.
    if (node.getContentKind() != null) {
      renderedBlock = UnsafeSanitizedContentOrdainer.ordainAsSafe(
          renderedBlock.stringValue(), node.getContentKind());
    }

    env.peek().put(node.getVarName(), renderedBlock);
  }
View Full Code Here


        // If the param node has a content kind attribute, it will have been autoescaped in the
        // corresponding context by the strict contextual autoescaper. Hence, the result of
        // evaluating the param block is wrapped in SanitizedContent of the specified kind.
        if (childCpcn.getContentKind() != null) {
          renderedBlock = UnsafeSanitizedContentOrdainer.ordainAsSafe(
              renderedBlock.stringValue(), childCpcn.getContentKind());
        }

        callData.putSingle(child.getKey(), renderedBlock);

      } else {
View Full Code Here

        "First argument to strContains() function is not StringData: %s",
        arg0.stringValue()));

    Preconditions.checkArgument(arg1 instanceof StringData, String.format(
        "Second argument to strContains() function is not StringData: %s",
        arg1.stringValue()));

    String strArg0 = arg0.stringValue();
    String strArg1 = arg1.stringValue();

    return toSoyData(strArg0.contains(strArg1));
View Full Code Here

    Preconditions.checkArgument(arg1 instanceof StringData, String.format(
        "Second argument to strContains() function is not StringData: %s",
        arg1.stringValue()));

    String strArg0 = arg0.stringValue();
    String strArg1 = arg1.stringValue();

    return toSoyData(strArg0.contains(strArg1));
  }

View Full Code Here

  public String getString(String keyStr) {
    SoyData valueData = get(keyStr);
    if (valueData == null) {
      throw new IllegalArgumentException("Missing key: " + keyStr);
    }
    return valueData.stringValue();
  }


  // -----------------------------------------------------------------------------------------------
  // Superpackage-private methods.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.