Interface Extension

All Known Implementing Classes:
AbstractExtension, AttributeResolverExtension, CoreExtension, DebugExtension, EscaperExtension, ExtensionCustomizer, I18nExtension

public interface Extension
  • Method Details

    • getFilters

      Map<String,Filter> getFilters()
      Use this method to provide custom filters.
      Returns:
      A list of filters. It is okay to return null.
    • getTests

      Map<String,Test> getTests()
      Use this method to provide custom tests.
      Returns:
      A list of tests. It is okay to return null.
    • getFunctions

      Map<String,Function> 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

      Map<String,Object> 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