public class InternalValueUtils extends Object
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Method and Description |
|---|---|
static com.google.common.collect.ImmutableMap<String,PrimitiveData> |
convertCompileTimeGlobalsMap(Map<String,?> compileTimeGlobalsMap)
Converts a compile-time globals map in user-provided format into one in the internal format.
|
static ExprNode.PrimitiveNode |
convertPrimitiveDataToExpr(PrimitiveData primitiveData,
SourceLocation location)
Converts a primitive data object into a primitive expression node.
|
static PrimitiveData |
convertPrimitiveExprToData(ExprNode.PrimitiveNode primitiveNode)
Converts a primitive expression node into a primitive data object.
|
@Nullable public static ExprNode.PrimitiveNode convertPrimitiveDataToExpr(PrimitiveData primitiveData, SourceLocation location)
primitiveData - The primitive data object to convert. Must not be undefined.location - The node's source location.public static PrimitiveData convertPrimitiveExprToData(ExprNode.PrimitiveNode primitiveNode)
primitiveNode - The primitive expression node to convert.public static com.google.common.collect.ImmutableMap<String,PrimitiveData> convertCompileTimeGlobalsMap(Map<String,?> compileTimeGlobalsMap)
The returned map will have the same iteration order as the provided map.
compileTimeGlobalsMap - Map from compile-time global name to value. The values can be any
of the Soy primitive types: null, boolean, integer, float (Java double), or string.IllegalArgumentException - If the map contains an invalid value.