Class AbstractExtension

java.lang.Object
io.pebbletemplates.pebble.extension.AbstractExtension
All Implemented Interfaces:
Extension
Direct Known Subclasses:
AttributeResolverExtension, CoreExtension, DebugExtension, EscaperExtension, I18nExtension

public abstract class AbstractExtension extends Object implements Extension
  • Constructor Details

    • AbstractExtension

      public AbstractExtension()
  • Method Details

    • getTokenParsers

      public List<TokenParser> getTokenParsers()
      Description copied from interface: Extension
      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.
      Specified by:
      getTokenParsers in interface Extension
      Returns:
      A list of TokenParsers. It is okay to return null.
    • getBinaryOperators

      public List<BinaryOperator> getBinaryOperators()
      Description copied from interface: Extension
      Use this method to provide custom binary operators.
      Specified by:
      getBinaryOperators in interface Extension
      Returns:
      A list of Operators. It is okay to return null;
    • getUnaryOperators

      public List<UnaryOperator> getUnaryOperators()
      Description copied from interface: Extension
      Use this method to provide custom unary operators.
      Specified by:
      getUnaryOperators in interface Extension
      Returns:
      A list of Operators. It is okay to return null;
    • getFilters

      public Map<String,Filter> getFilters()
      Description copied from interface: Extension
      Use this method to provide custom filters.
      Specified by:
      getFilters in interface Extension
      Returns:
      A list of filters. It is okay to return null.
    • getTests

      public Map<String,Test> getTests()
      Description copied from interface: Extension
      Use this method to provide custom tests.
      Specified by:
      getTests in interface Extension
      Returns:
      A list of tests. It is okay to return null.
    • getFunctions

      public Map<String,Function> getFunctions()
      Description copied from interface: Extension
      Use this method to provide custom functions.
      Specified by:
      getFunctions in interface Extension
      Returns:
      A list of functions. It is okay to return null.
    • getGlobalVariables

      public Map<String,Object> getGlobalVariables()
      Description copied from interface: Extension
      Use this method to provide variables available to all templates
      Specified by:
      getGlobalVariables in interface Extension
      Returns:
      Map of global variables available to all templates
    • getNodeVisitors

      public List<NodeVisitorFactory> getNodeVisitors()
      Description copied from interface: Extension
      Node visitors will travel the AST tree during the compilation phase.
      Specified by:
      getNodeVisitors in interface Extension
      Returns:
      a list of node visitors
    • getAttributeResolver

      public List<AttributeResolver> getAttributeResolver()
      Description copied from interface: Extension
      AttributeResolver will resolve instance attributes
      Specified by:
      getAttributeResolver in interface Extension
      Returns:
      a list of attribute resolver