Class EscaperNodeVisitorFactory

java.lang.Object
io.pebbletemplates.pebble.extension.escaper.EscaperNodeVisitorFactory
All Implemented Interfaces:
NodeVisitorFactory

public class EscaperNodeVisitorFactory extends Object implements NodeVisitorFactory
Factory class for creating EscaperNodeVisitor.
  • Field Details

    • autoEscaping

      private boolean autoEscaping
  • Constructor Details

    • EscaperNodeVisitorFactory

      public EscaperNodeVisitorFactory()
  • Method Details

    • createVisitor

      public NodeVisitor createVisitor(PebbleTemplate template)
      Description copied from interface: NodeVisitorFactory
      This method creates a new instance of a NodeVisitor.

      The method is called whenever a visitor is applied to a PebbleTemplate.

      The method needs to be thread-safe. However the NodeVisitor itself does not need to be thread-safe.

      Specified by:
      createVisitor in interface NodeVisitorFactory
      Parameters:
      template - the template for which a visitor should be created for.
      Returns:
      the visitor.
    • setAutoEscaping

      public void setAutoEscaping(boolean auto)