Class ElementNode
java.lang.Object
net.kyori.adventure.text.minimessage.internal.parser.node.ElementNode
- All Implemented Interfaces:
Node
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(ElementNode childNode) Adds a child to this node.buildToString(StringBuilder sb, int indent) Serializes this node to a string.children()Returns the children of this node.@Nullable ElementNodeparent()Returns the parent of this node, if present.Returns the source message of this node.@Nullable Tokentoken()Returns the token that lead to the creation of this token.toString()Get a human-readable representation of this node and its descendants for debugging purposes.Returns an unsafe view of the children of this node.
-
Method Details
-
parent
Returns the parent of this node, if present. -
token
Returns the token that lead to the creation of this token.- Returns:
- the token
- Since:
- 4.10.0
-
sourceMessage
Returns the source message of this node.- Returns:
- the source message
- Since:
- 4.10.0
-
children
Returns the children of this node. -
unsafeChildren
Returns an unsafe view of the children of this node.- Returns:
- the children of this node
- Since:
- 4.10.0
-
addChild
Adds a child to this node.This method will attempt to join text tokens together if possible.
- Parameters:
childNode- the child node to add.- Since:
- 4.10.0
-
buildToString
Serializes this node to a string.- Parameters:
sb- the string builder to serialize intoindent- the current indent level- Returns:
- the passed string builder, for chaining
- Since:
- 4.10.0
-
toString
-