Class PebbleEngine

java.lang.Object
io.pebbletemplates.pebble.PebbleEngine

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.
Author:
Mitchell
  • Method Details

    • getTemplate

      public PebbleTemplate getTemplate(String templateName)
      Loads, parses, and compiles a template into an instance of PebbleTemplate and returns this instance.
      Parameters:
      templateName - The name of the template
      Returns:
      PebbleTemplate The compiled version of the template
    • getLiteralTemplate

      public PebbleTemplate getLiteralTemplate(String templateName)
      Loads, parses, and compiles a template using a StringLoader into an instance of PebbleTemplate and returns this instance.
      Parameters:
      templateName - The name of the template
      Returns:
      PebbleTemplate The compiled version of the template
    • getLoader

      public Loader<?> getLoader()
      Returns the loader
      Returns:
      The loader
    • getTemplateCache

      public PebbleCache<Object,PebbleTemplate> getTemplateCache()
      Returns the template cache
      Returns:
      The template cache
    • isStrictVariables

      public boolean isStrictVariables()
      Returns the strict variables setting
      Returns:
      The strict variables setting
    • getDefaultLocale

      public Locale getDefaultLocale()
      Returns the default locale
      Returns:
      The default locale
    • getMaxRenderedSize

      public int getMaxRenderedSize()
      Returns the max rendered size.
      Returns:
      The max rendered size.
    • getExecutorService

      public ExecutorService getExecutorService()
      Returns the executor service
      Returns:
      The executor service
    • getSyntax

      public Syntax getSyntax()
      Returns the syntax which is used by this PebbleEngine.
      Returns:
      the syntax used by the PebbleEngine.
    • getExtensionRegistry

      public ExtensionRegistry getExtensionRegistry()
      Returns the extension registry.
      Returns:
      The extension registry
    • getTagCache

      public PebbleCache<CacheKey,Object> getTagCache()
      Returns the tag cache
      Returns:
      The tag cache
    • getEvaluationOptions

      public EvaluationOptions getEvaluationOptions()