Package com.google.template.soy.data.internal

Examples of com.google.template.soy.data.internal.AugmentedSoyMapData


  }


  public static SoyMapData $$augmentData(SoyMapData baseData, SoyMapData additionalData) {

    AugmentedSoyMapData augmentedData = new AugmentedSoyMapData(baseData);
    for (Map.Entry<String, SoyData> entry : additionalData.asMap().entrySet()) {
      augmentedData.putSingle(entry.getKey(), entry.getValue());
    }
    return augmentedData;
  }
View Full Code Here


    } else if (node.numChildren() == 0) {
      // Case 2: No params. Just pass in the current data.
      callData = dataToPass;
    } else {
      // Case 3: Passing data and adding params. Need to augment the current data.
      callData = new AugmentedSoyMapData(dataToPass);
    }

    for (CallParamNode child : node.getChildren()) {

      if (child instanceof CallParamValueNode) {
View Full Code Here

    Preconditions.checkArgument(arg0 instanceof SoyMapData,
        "First argument to augmentMap() function is not SoyMapData.");
    Preconditions.checkArgument(arg1 instanceof SoyMapData,
        "Second argument to augmentMap() function is not SoyMapData.");

    AugmentedSoyMapData augmentedMap = new AugmentedSoyMapData((SoyMapData) arg0);
    SoyMapData additionalMap = (SoyMapData) arg1;
    for (String key : additionalMap.getKeys()) {
      augmentedMap.putSingle(key, additionalMap.getSingle(key));
    }
    return augmentedMap;
  }
View Full Code Here

TOP

Related Classes of com.google.template.soy.data.internal.AugmentedSoyMapData

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.