com.google.template.soy.parseinfo
Class SoyTemplateInfo

java.lang.Object
  extended by com.google.template.soy.parseinfo.SoyTemplateInfo

public class SoyTemplateInfo
extends Object

Parsed info about a template.


Nested Class Summary
static class SoyTemplateInfo.ParamRequisiteness
          Enum for whether a param is required or optional for a specific template.
 
Constructor Summary
SoyTemplateInfo(String name, com.google.common.collect.ImmutableMap<String,SoyTemplateInfo.ParamRequisiteness> paramMap)
          Deprecated. Users should not be creating SoyTemplateInfo objects. If you're constructing SoyTemplateInfo objects from non-Soy-internal code, your code will be broken by future Soy changes.
SoyTemplateInfo(String name, com.google.common.collect.ImmutableMap<String,SoyTemplateInfo.ParamRequisiteness> paramMap, com.google.common.collect.ImmutableSortedSet<String> ijParamSet, boolean mayHaveIjParamsInExternalCalls, boolean mayHaveIjParamsInExternalDelCalls)
          Constructor for internal use only, for the general case.
 
Method Summary
 String getName()
          Returns the full template name, e.g.
 com.google.common.collect.ImmutableMap<String,SoyTemplateInfo.ParamRequisiteness> getParams()
          Returns a map from each param to whether it's required for this template.
 String getPartialName()
          Returns the partial template name (starting from the last dot), e.g.
 com.google.common.collect.ImmutableSortedSet<String> getUsedIjParams()
          Returns the set of injected params used by this template (or a transitive callee).
 boolean mayHaveIjParamsInExternalCalls()
          Returns whether this template may have injected params indirectly used in external basic calls (i.e.
 boolean mayHaveIjParamsInExternalDelCalls()
          Returns whether this template may have injected params indirectly used in external delegate calls (i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoyTemplateInfo

@Deprecated
public SoyTemplateInfo(String name,
                                  com.google.common.collect.ImmutableMap<String,SoyTemplateInfo.ParamRequisiteness> paramMap)
Deprecated. Users should not be creating SoyTemplateInfo objects. If you're constructing SoyTemplateInfo objects from non-Soy-internal code, your code will be broken by future Soy changes.

Constructor for internal use only, for the case of a template that doesn't use injected data (even transitively).

Important: Do not construct SoyTemplateInfo objects outside of Soy internal or Soy-generated code. User code that constructs SoyTemplateInfo objects will be broken by future Soy changes.

Parameters:
name - The full template name.
paramMap - Map from each param to whether it's required for this template.

SoyTemplateInfo

public SoyTemplateInfo(String name,
                       com.google.common.collect.ImmutableMap<String,SoyTemplateInfo.ParamRequisiteness> paramMap,
                       com.google.common.collect.ImmutableSortedSet<String> ijParamSet,
                       boolean mayHaveIjParamsInExternalCalls,
                       boolean mayHaveIjParamsInExternalDelCalls)
Constructor for internal use only, for the general case.

Important: Do not construct SoyTemplateInfo objects outside of Soy internal or Soy-generated code. User code that constructs SoyTemplateInfo objects will be broken by future Soy changes.

Parameters:
name - The full template name.
paramMap - Map from each param to whether it's required for this template.
ijParamSet - Set of injected params used by this template (or a transitive callee).
mayHaveIjParamsInExternalCalls - Whether this template may have injected params indirectly used in external basic calls.
mayHaveIjParamsInExternalDelCalls - Whether this template may have injected params indirectly used in external delegate calls.
Method Detail

getName

public String getName()
Returns the full template name, e.g. myNamespace.myTemplate.


getPartialName

public String getPartialName()
Returns the partial template name (starting from the last dot), e.g. .myTemplate.


getParams

public com.google.common.collect.ImmutableMap<String,SoyTemplateInfo.ParamRequisiteness> getParams()
Returns a map from each param to whether it's required for this template.


getUsedIjParams

public com.google.common.collect.ImmutableSortedSet<String> getUsedIjParams()
Returns the set of injected params used by this template (or a transitive callee).

See Also:
mayHaveIjParamsInExternalCalls(), mayHaveIjParamsInExternalDelCalls()

mayHaveIjParamsInExternalCalls

public boolean mayHaveIjParamsInExternalCalls()
Returns whether this template may have injected params indirectly used in external basic calls (i.e. calls to templates not defined in the bundle of Soy files being compiled together with this template).


mayHaveIjParamsInExternalDelCalls

public boolean mayHaveIjParamsInExternalDelCalls()
Returns whether this template may have injected params indirectly used in external delegate calls (i.e. delegate calls that resolve to delegate implementations not defined in the bundle of Soy files being compiled together with this template).