public class ModuleUtils extends Object
Important: Do not use outside of Soy code (treat as superpackage-private).
| Modifier and Type | Method and Description |
|---|---|
static <T extends SoyPrintDirective> |
buildSpecificSoyDirectivesMap(Set<SoyPrintDirective> soyDirectivesSet,
Class<T> specificSoyDirectiveType)
Given the set of all Soy directive implementations and a specific Soy directive type (subtype
of SoyPrintDirective) to look for, finds the Soy directives that implement the specific type
and returns them in the form of a map from directive name to directive.
|
static <T extends SoyPrintDirective,D extends SoyPrintDirective> |
buildSpecificSoyDirectivesMapWithAdaptation(Set<SoyPrintDirective> soyDirectivesSet,
Class<T> specificSoyDirectiveType,
Class<D> equivDeprecatedSoyDirectiveType,
com.google.common.base.Function<D,T> adaptFn)
Given the set of all Soy directive implementations, a specific Soy directive type (subtype of
SoyPrintDirective) to look for, another Soy directive type to look for that is an equivalent
deprecated version of the specific Soy directive type, and an adapt function for adapting the
deprecated type to the specific type, finds the Soy directives that implement either type and
returns them in the form of a map from directive name to directive, where the directives with
the deprecated type have been adapted using the adapt function.
|
static <T extends SoyFunction> |
buildSpecificSoyFunctionsMap(Set<SoyFunction> soyFunctionsSet,
Class<T> specificSoyFunctionType)
Given the set of all Soy function implementations and a specific Soy function type (subtype
of SoyFunction) to look for, finds the Soy functions that implement the specific type
and returns them in the form of a map from function name to function.
|
static <T extends SoyFunction,D extends SoyFunction> |
buildSpecificSoyFunctionsMapWithAdaptation(Set<SoyFunction> soyFunctionsSet,
Class<T> specificSoyFunctionType,
Class<D> equivDeprecatedSoyFunctionType,
com.google.common.base.Function<D,T> adaptFn)
Given the set of all Soy function implementations, a specific Soy function type (subtype of
SoyFunction) to look for, another Soy function type to look for that is an equivalent
deprecated version of the specific Soy function type, and an adapt function for adapting the
deprecated type to the specific type, finds the Soy functions that implement either type and
returns them in the form of a map from function name to function, where the functions with
the deprecated type have been adapted using the adapt function.
|
public static <T extends SoyFunction> com.google.common.collect.ImmutableMap<String,T> buildSpecificSoyFunctionsMap(Set<SoyFunction> soyFunctionsSet, Class<T> specificSoyFunctionType)
T - The specific Soy function type to look for.soyFunctionsSet - The set of all Soy functions.specificSoyFunctionType - The class of the specific Soy function type to look for.public static <T extends SoyFunction,D extends SoyFunction> com.google.common.collect.ImmutableMap<String,T> buildSpecificSoyFunctionsMapWithAdaptation(Set<SoyFunction> soyFunctionsSet, Class<T> specificSoyFunctionType, Class<D> equivDeprecatedSoyFunctionType, com.google.common.base.Function<D,T> adaptFn)
T - The specific Soy function type to look for.D - The equivalent deprecated Soy function type to also look for.soyFunctionsSet - The set of all Soy functions.specificSoyFunctionType - The class of the specific Soy function type to look for.equivDeprecatedSoyFunctionType - The class of the equivalent deprecated Soy function
type to also look for.adaptFn - The adapt function that adapts the deprecated type to the specific type.public static <T extends SoyPrintDirective> com.google.common.collect.ImmutableMap<String,T> buildSpecificSoyDirectivesMap(Set<SoyPrintDirective> soyDirectivesSet, Class<T> specificSoyDirectiveType)
T - The specific Soy directive type to look for.soyDirectivesSet - The set of all Soy directives.specificSoyDirectiveType - The class of the specific Soy directive type to look for.public static <T extends SoyPrintDirective,D extends SoyPrintDirective> com.google.common.collect.ImmutableMap<String,T> buildSpecificSoyDirectivesMapWithAdaptation(Set<SoyPrintDirective> soyDirectivesSet, Class<T> specificSoyDirectiveType, Class<D> equivDeprecatedSoyDirectiveType, com.google.common.base.Function<D,T> adaptFn)
T - The specific Soy directive type to look for.D - The equivalent deprecated Soy directive type to also look for.soyDirectivesSet - The set of all Soy directives.specificSoyDirectiveType - The class of the specific Soy directive type to look for.equivDeprecatedSoyDirectiveType - The class of the equivalent deprecated Soy directive
type to also look for.adaptFn - The adapt function that adapts the deprecated type to the specific type.