Package eu.maveniverse.domtrip
Class Editor.EditorTextBuilder
- java.lang.Object
-
- eu.maveniverse.domtrip.Editor.EditorTextBuilder
-
- Enclosing class:
- Editor
public static class Editor.EditorTextBuilder extends java.lang.ObjectBuilder for creating text nodes within the Editor context.This builder integrates with the Editor's configuration and automatically adds the created text node to the specified parent.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Editor.EditorTextBuilderasCData()Makes this text node a CDATA section.Textbuild()Builds and adds the text node to the document.Editor.EditorTextBuilderto(ContainerNode parent)Sets the parent node for this text.Editor.EditorTextBuilderwithContent(java.lang.String content)Sets the content of this text node.
-
-
-
Method Detail
-
to
public Editor.EditorTextBuilder to(ContainerNode parent)
Sets the parent node for this text.- Parameters:
parent- the parent node- Returns:
- this builder for method chaining
-
withContent
public Editor.EditorTextBuilder withContent(java.lang.String content)
Sets the content of this text node.- Parameters:
content- the text content- Returns:
- this builder for method chaining
-
asCData
public Editor.EditorTextBuilder asCData()
Makes this text node a CDATA section.- Returns:
- this builder for method chaining
-
build
public Text build() throws DomTripException
Builds and adds the text node to the document.- Returns:
- the created and added text node
- Throws:
DomTripException
-
-