TemplateProcessingTracer (FreeMarker 2.3.35 API)
Description: declaration: package: freemarker.core, interface: TemplateProcessingTracer

Package freemarker.core

# Interface TemplateProcessingTracer

public interface TemplateProcessingTracer
Hooks to monitor as templates run. This may be used to implement profiling, coverage analysis, execution tracing, and other on-the-fly debugging mechanisms.

Use `Environment.setTemplateProcessingTracer(TemplateProcessingTracer)` to set a tracer for the current environment.

Since:
  2.3.33

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static interface`
  `TemplateProcessingTracer.TracedElement`
  Information about the template element that we enter of exit; do NOT implement this (outside FreeMarker), as new methods can be added to this anytime!

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `enterElement​(Environment env, TemplateProcessingTracer.TracedElement tracedElement)`
  Invoked by `Environment` whenever it starts processing a new template element.
  `void`
  `exitElement​(Environment env, TemplateProcessingTracer.TracedElement tracedElement)`
  Invoked by `Environment` whenever it completes processing a new template element.

- ## Method Details

  - ### enterElement

    void enterElement​(Environment env, TemplateProcessingTracer.TracedElement tracedElement)
    Invoked by `Environment` whenever it starts processing a new template element. A template element is a directive call, an interpolation (like `${...}`), a comment block, or static text. Expressions are not template elements.

  - ### exitElement

    void exitElement​(Environment env, TemplateProcessingTracer.TracedElement tracedElement)
    Invoked by `Environment` whenever it completes processing a new template element.
    See Also:
      `enterElement(Environment, TracedElement)`