Fork me on GitHub

ExtensionCustomizer

In package com.mitchellbosecke.pebble.extension

public abstract class ExtensionCustomizer extends Object implements Extension

Base class that allows implementing a customizer to modify Pebbles build-in extensions. It is meant to provide a way to remove or replace functions, filters, tags, etc. to change the standard behaviour. Use-cases can be down-stripping available functionality for security reasons.

Implementations of this class are meant to overwrite methods and access registered functionality before it is loaded into the PebbleEngine by calling super.

The ExentsionCustomizer can be registred via PebbleEngine.Builder and is applied for every non-user-provided extension.

Constructors

public ExtensionCustomizer(Extension delegate)
Parameters:

Methods

public Map<String, Filter> getFilters()
Parameters:
  • No parameters
public Map<String, Test> getTests()
Parameters:
  • No parameters
public Map<String, Function> getFunctions()
Parameters:
  • No parameters
public List<TokenParser> getTokenParsers()
Parameters:
  • No parameters
public List<BinaryOperator> getBinaryOperators()
Parameters:
  • No parameters
public List<UnaryOperator> getUnaryOperators()
Parameters:
  • No parameters
public Map<String, Object> getGlobalVariables()
Parameters:
  • No parameters
public List<NodeVisitorFactory> getNodeVisitors()
Parameters:
  • No parameters
public List<AttributeResolver> getAttributeResolver()
Parameters:
  • No parameters