Class Editor.EditorCommentBuilder

  • Enclosing class:
    Editor

    public static class Editor.EditorCommentBuilder
    extends java.lang.Object
    Builder for creating comments within the Editor context.

    This builder integrates with the Editor's whitespace management and automatically adds the created comment to the specified parent.

    • Method Detail

      • withContent

        public Editor.EditorCommentBuilder withContent​(java.lang.String content)
        Sets the content of this comment.
        Parameters:
        content - the comment content
        Returns:
        this builder for method chaining
      • build

        public Comment build()
                      throws DomTripException
        Builds and adds the comment to the document.
        Returns:
        the created and added comment
        Throws:
        DomTripException - if the comment cannot be added