Fork me on GitHub

PebbleEngine

In package com.mitchellbosecke.pebble

public class PebbleEngine extends Object

The main class used for compiling templates. The PebbleEngine is responsible for delegating responsibility to the lexer, parser, compiler, and template cache.

Methods

public PebbleTemplate getTemplate(String templateName)

Loads, parses, and compiles a template into an instance of PebbleTemplate and returns this instance.

Parameters:
  • String templateName

    The name of the template

public PebbleTemplate getLiteralTemplate(String templateName)

Loads, parses, and compiles a template using a StringLoader into an instance of PebbleTemplate and returns this instance.

Parameters:
  • String templateName

    The name of the template

public Loader<?> getLoader()

Returns the loader

Parameters:
  • No parameters
public PebbleCache<Object, PebbleTemplate> getTemplateCache()

Returns the template cache

Parameters:
  • No parameters
public boolean isStrictVariables()

Returns the strict variables setting

Parameters:
  • No parameters
public Locale getDefaultLocale()

Returns the default locale

Parameters:
  • No parameters
public int getMaxRenderedSize()

Returns the max rendered size.

Parameters:
  • No parameters
public ExecutorService getExecutorService()

Returns the executor service

Parameters:
  • No parameters
public Syntax getSyntax()

Returns the syntax which is used by this PebbleEngine.

Parameters:
  • No parameters
public ExtensionRegistry getExtensionRegistry()

Returns the extension registry.

Parameters:
  • No parameters
public PebbleCache<CacheKey, Object> getTagCache()

Returns the tag cache

Parameters:
  • No parameters
public EvaluationOptions getEvaluationOptions()
Parameters:
  • No parameters