Class TemplateCall


  • public class TemplateCall
    extends Object
    Runtime presentation of a template invocation or call site. Handles arguments, prepares template context for a call. Represents node<ITemplateCall>.
    • Constructor Detail

      • TemplateCall

        public TemplateCall​(@NotNull
                            SNode templateCall)
        At the moment, we handle ITemplateCall only, the reference to TemplateDeclaration with accompanying arguments. Elements with references to TemplateDeclaration without arguments (like WeaveEach) shall not get here (although it's not a big deal to handle it here, just keep myArguments empty, and return outerContext unchanged). The reason it's not done here as this knowledge (which consequence is ITemplateCall) is static, and I don't want runtime checks for static knowledge
        Parameters:
        templateCall - ITemplateCall node
      • TemplateCall

        public TemplateCall​(@Nullable
                            String[] parameterNames,
                            @Nullable
                            Object[] arguments)
        Transition from TemplateDeclaration that knows its arguments at construction time to TD that evaluates argument values prior to call and therefore can cache and reuse template runtime nodes (i.e. TemplateContainer)
        Parameters:
        parameterNames - name of template parameter, if any
        arguments - values of template parameters