Interface Extension
- All Known Implementing Classes:
AbstractExtension
,AttributeResolverExtension
,CoreExtension
,DebugExtension
,EscaperExtension
,ExtensionCustomizer
,I18nExtension
public interface Extension
-
Method Summary
Modifier and TypeMethodDescriptionAttributeResolver will resolve instance attributesUse this method to provide custom binary operators.Use this method to provide custom filters.Use this method to provide custom functions.Use this method to provide variables available to all templatesNode visitors will travel the AST tree during the compilation phase.getTests()
Use this method to provide custom tests.Use this method to provide custom tags.Use this method to provide custom unary operators.
-
Method Details
-
getFilters
Use this method to provide custom filters.- Returns:
- A list of filters. It is okay to return null.
-
getTests
Use this method to provide custom tests.- Returns:
- A list of tests. It is okay to return null.
-
getFunctions
Use this method to provide custom functions.- Returns:
- A list of functions. It is okay to return null.
-
getTokenParsers
List<TokenParser> getTokenParsers()Use this method to provide custom tags. A TokenParser is used to parse a stream of tokens into Nodes which are then responsible for compiling themselves into Java.- Returns:
- A list of TokenParsers. It is okay to return null.
-
getBinaryOperators
List<BinaryOperator> getBinaryOperators()Use this method to provide custom binary operators.- Returns:
- A list of Operators. It is okay to return null;
-
getUnaryOperators
List<UnaryOperator> getUnaryOperators()Use this method to provide custom unary operators.- Returns:
- A list of Operators. It is okay to return null;
-
getGlobalVariables
Use this method to provide variables available to all templates- Returns:
- Map of global variables available to all templates
-
getNodeVisitors
List<NodeVisitorFactory> getNodeVisitors()Node visitors will travel the AST tree during the compilation phase.- Returns:
- a list of node visitors
-
getAttributeResolver
List<AttributeResolver> getAttributeResolver()AttributeResolver will resolve instance attributes- Returns:
- a list of attribute resolver
-