Class CommentHooker

java.lang.Object
pro.verron.officestamper.api.CommentHooker
All Implemented Interfaces:
PreProcessor

public final class CommentHooker extends Object implements PreProcessor

The CommentHooker class is responsible for preparing comment processors in a Word document. It implements the PreProcessor interface and provides functionality to process comment range starts and wrap them with smart tags for further processing by the OfficeStamper engine.

This pre-processor is typically used to identify and mark comment-based expressions, making them recognizable as hooks for subsequent processing steps.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    A collector class that gathers CommentRangeStart elements during document traversal.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for CommentHooker.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    process(org.docx4j.openpackaging.packages.WordprocessingMLPackage document)
    Processes the provided WordprocessingMLPackage document based on implementation-specific behavior.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CommentHooker

      public CommentHooker()
      Default constructor for CommentHooker.
  • Method Details

    • process

      public void process(org.docx4j.openpackaging.packages.WordprocessingMLPackage document)
      Description copied from interface: PreProcessor
      Processes the provided WordprocessingMLPackage document based on implementation-specific behavior. This method allows for manipulation or transformation of the document, such as modifying its content, sanitizing specific sections, or preparing the document for further actions.
      Specified by:
      process in interface PreProcessor
      Parameters:
      document - the WordprocessingMLPackage document to be processed; cannot be null