JsArrayLiteral permProps = new JsArrayLiteral(sourceInfo);
for (ImmutableMap<String, String> propMap : props.findEmbeddedProperties(TreeLogger.NULL)) {
JsArrayLiteral entryList = new JsArrayLiteral(sourceInfo);
for (Entry<String, String> entry : propMap.entrySet()) {
JsArrayLiteral pair = new JsArrayLiteral(sourceInfo,
new JsStringLiteral(sourceInfo, entry.getKey()),
new JsStringLiteral(sourceInfo, entry.getValue()));
entryList.getExpressions().add(pair);
}
permProps.getExpressions().add(entryList);
}
jsProgram.getGlobalBlock().getStatements().add(
constructInvocation(sourceInfo, "ModuleUtils.setGwtProperty",
new JsStringLiteral(sourceInfo, "permProps"), permProps).makeStmt());
}