Add an API for getting the list of required CSS namespaces with a SoyTemplate, not a template name. We can't get the template name off the SoyTemplate ourselves because the API is restricted.
@@ -72,6 +72,15 @@ public interface SoySauce {
ImmutableList<String> getAllRequiredCssNamespaces(
String templateName, Predicate<String> enabledDelpackages, boolean collectCssFromDelvariants);
+ /** As above, but given a SoyTemplate instead of a template name. */
+ default ImmutableList<String> getAllRequiredCssNamespaces(
+ SoyTemplate template,
+ Predicate<String> enabledDelpackages,
+ boolean collectCssFromDelvariants) {
+ return getAllRequiredCssNamespaces(
+ template.getTemplateName(), enabledDelpackages, collectCssFromDelvariants);
+ }
+
/**
* Indicates whether the current {@link SoySauce} instance holds a given template.
*
