Fork me on GitHub

Extension

In package com.mitchellbosecke.pebble.extension

public interface interface Extension

Methods

public Map<String, Filter> getFilters()

Use this method to provide custom filters.

Parameters:
  • No parameters
public Map<String, Test> getTests()

Use this method to provide custom tests.

Parameters:
  • No parameters
public Map<String, Function> getFunctions()

Use this method to provide custom functions.

Parameters:
  • No parameters
public 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.

Parameters:
  • No parameters
public List<BinaryOperator> getBinaryOperators()

Use this method to provide custom binary operators.

Parameters:
  • No parameters
public List<UnaryOperator> getUnaryOperators()

Use this method to provide custom unary operators.

Parameters:
  • No parameters
public Map<String, Object> getGlobalVariables()

Use this method to provide variables available to all templates

Parameters:
  • No parameters
public List<NodeVisitorFactory> getNodeVisitors()

Node visitors will travel the AST tree during the compilation phase.

Parameters:
  • No parameters
public List<AttributeResolver> getAttributeResolver()

AttributeResolver will resolve instance attributes

Parameters:
  • No parameters