freemarker.template
Interface FunctionTemplateProcessor

All Superinterfaces:
TemplateProcessor
All Known Implementing Classes:
FunctionInstruction, LocalInstruction, Template

public interface FunctionTemplateProcessor
extends TemplateProcessor

Adds the ability to retrieve Template functions from a TemplateProcessor. Used by IncludeInstruction to retrieve a list of callable Functions.

Version:
$Id: FunctionTemplateProcessor.java 1101 2013-04-01 04:17:32Z run2000 $

Nested Class Summary
 
Nested classes/interfaces inherited from interface freemarker.template.TemplateProcessor
TemplateProcessor.ExitStatus
 
Method Summary
 void addFunction(java.lang.String name, TemplateFunctionModel function)
          Adds a function to the template.
 TemplateFunctionModel getFunction(java.lang.String name)
          Retrieves a function from the template.
 java.util.Set<java.lang.String> getFunctionNames()
          Retrieve a Set of function names for this template.
 
Methods inherited from interface freemarker.template.TemplateProcessor
process
 

Method Detail

getFunction

TemplateFunctionModel getFunction(java.lang.String name)
Retrieves a function from the template. Called by CallInstructions and IncludeInstructions at run-time.

Parameters:
name - the name of the function to be retrieved

getFunctionNames

java.util.Set<java.lang.String> getFunctionNames()
Retrieve a Set of function names for this template.

Returns:
a Set of function names (String objects) that have been defined for this template.

addFunction

void addFunction(java.lang.String name,
                 TemplateFunctionModel function)
Adds a function to the template. Called by the TemplateBuilder at compile-time.

Parameters:
name - the name of the function to be stored
function - the function to be stored by the template