Class CoreExtension
- java.lang.Object
-
- io.pebbletemplates.pebble.extension.AbstractExtension
-
- io.pebbletemplates.pebble.extension.core.CoreExtension
-
- All Implemented Interfaces:
Extension
public class CoreExtension extends AbstractExtension
-
-
Constructor Summary
Constructors Constructor Description CoreExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<BinaryOperator>getBinaryOperators()Use this method to provide custom binary operators.java.util.Map<java.lang.String,Filter>getFilters()Use this method to provide custom filters.java.util.Map<java.lang.String,Function>getFunctions()Use this method to provide custom functions.java.util.Map<java.lang.String,java.lang.Object>getGlobalVariables()Use this method to provide variables available to all templatesjava.util.List<NodeVisitorFactory>getNodeVisitors()Node visitors will travel the AST tree during the compilation phase.java.util.Map<java.lang.String,Test>getTests()Use this method to provide custom tests.java.util.List<TokenParser>getTokenParsers()Use this method to provide custom tags.java.util.List<UnaryOperator>getUnaryOperators()Use this method to provide custom unary operators.-
Methods inherited from class io.pebbletemplates.pebble.extension.AbstractExtension
getAttributeResolver
-
-
-
-
Method Detail
-
getTokenParsers
public java.util.List<TokenParser> getTokenParsers()
Description copied from interface:ExtensionUse 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.- Specified by:
getTokenParsersin interfaceExtension- Overrides:
getTokenParsersin classAbstractExtension- Returns:
- A list of TokenParsers. It is okay to return null.
-
getUnaryOperators
public java.util.List<UnaryOperator> getUnaryOperators()
Description copied from interface:ExtensionUse this method to provide custom unary operators.- Specified by:
getUnaryOperatorsin interfaceExtension- Overrides:
getUnaryOperatorsin classAbstractExtension- Returns:
- A list of Operators. It is okay to return null;
-
getBinaryOperators
public java.util.List<BinaryOperator> getBinaryOperators()
Description copied from interface:ExtensionUse this method to provide custom binary operators.- Specified by:
getBinaryOperatorsin interfaceExtension- Overrides:
getBinaryOperatorsin classAbstractExtension- Returns:
- A list of Operators. It is okay to return null;
-
getFilters
public java.util.Map<java.lang.String,Filter> getFilters()
Description copied from interface:ExtensionUse this method to provide custom filters.- Specified by:
getFiltersin interfaceExtension- Overrides:
getFiltersin classAbstractExtension- Returns:
- A list of filters. It is okay to return null.
-
getTests
public java.util.Map<java.lang.String,Test> getTests()
Description copied from interface:ExtensionUse this method to provide custom tests.- Specified by:
getTestsin interfaceExtension- Overrides:
getTestsin classAbstractExtension- Returns:
- A list of tests. It is okay to return null.
-
getFunctions
public java.util.Map<java.lang.String,Function> getFunctions()
Description copied from interface:ExtensionUse this method to provide custom functions.- Specified by:
getFunctionsin interfaceExtension- Overrides:
getFunctionsin classAbstractExtension- Returns:
- A list of functions. It is okay to return null.
-
getGlobalVariables
public java.util.Map<java.lang.String,java.lang.Object> getGlobalVariables()
Description copied from interface:ExtensionUse this method to provide variables available to all templates- Specified by:
getGlobalVariablesin interfaceExtension- Overrides:
getGlobalVariablesin classAbstractExtension- Returns:
- Map of global variables available to all templates
-
getNodeVisitors
public java.util.List<NodeVisitorFactory> getNodeVisitors()
Description copied from interface:ExtensionNode visitors will travel the AST tree during the compilation phase.- Specified by:
getNodeVisitorsin interfaceExtension- Overrides:
getNodeVisitorsin classAbstractExtension- Returns:
- a list of node visitors
-
-