public final class LegacyObjectMapToMapFunction extends Object implements SoyJavaFunction, SoyJbcSrcFunction, SoyPySrcFunction, SoyLibraryAssistedJsSrcFunction
legacy_object_map to values of type experimental_map.
(This is the inverse of MapToLegacyObjectMapFunction.)
The two map types are designed to be incompatible in the Soy type system; the long-term plan
is to migrate all legacy_object_maps to experimental_maps, rename experimental_map to map, and delete legacy_object_map. To allow template-level
migrations of legacy_object_map parameters to experimental_map, we need plugins
to convert between the two maps, so that converting one template doesn't require converting its
transitive callees.
NOTE: this function has special support in the type checker for calculating the return type
| Modifier and Type | Method and Description |
|---|---|
SoyValue |
computeForJava(List<SoyValue> args)
Computes this function on the given arguments.
|
SoyExpression |
computeForJbcSrc(JbcSrcPluginContext context,
List<SoyExpression> args)
Computes this function on the given arguments for the Jbcsrc Source backend.
|
JsExpr |
computeForJsSrc(List<JsExpr> args)
Computes this function on the given arguments for the JS Source backend.
|
PyExpr |
computeForPySrc(List<PyExpr> args)
Computes this function on the given arguments for the Python Source backend.
|
String |
getName()
Gets the name of the Soy function.
|
com.google.common.collect.ImmutableSet<String> |
getRequiredJsLibNames()
Returns a list of Closure library names to require when this function is used.
|
Set<Integer> |
getValidArgsSizes()
Gets the set of valid args list sizes.
|
public String getName()
SoyFunctiongetName in interface SoyFunctionpublic Set<Integer> getValidArgsSizes()
SoyFunctiongetValidArgsSizes in interface SoyFunctionpublic com.google.common.collect.ImmutableSet<String> getRequiredJsLibNames()
SoyLibraryAssistedJsSrcFunctionNote: Return the raw Closure library names, Soy will wrap them in goog.require for you.
getRequiredJsLibNames in interface SoyLibraryAssistedJsSrcFunctionpublic SoyExpression computeForJbcSrc(JbcSrcPluginContext context, List<SoyExpression> args)
SoyJbcSrcFunctioncomputeForJbcSrc in interface SoyJbcSrcFunctioncontext - Contextual data for the current render operation.args - The function arguments.public JsExpr computeForJsSrc(List<JsExpr> args)
SoyJsSrcFunctioncomputeForJsSrc in interface SoyJsSrcFunctionargs - The function arguments.public PyExpr computeForPySrc(List<PyExpr> args)
SoyPySrcFunctioncomputeForPySrc in interface SoyPySrcFunctionargs - The function arguments.public SoyValue computeForJava(List<SoyValue> args)
SoyJavaFunctioncomputeForJava in interface SoyJavaFunctionargs - The function arguments.