@Override
  public @NotNull StringBuilder buildToString(final @NotNull StringBuilder sb, final int indent) {
    final char[] in = this.ident(indent);
    sb.append(in).append("TagNode(");

    final int size = this.parts.size();
    for (int i = 0; i < size; i++) {
      final TagPart part = this.parts.get(i);
      sb.append('\'').append(part.value()).append('\'');
      if (i != size - 1) {
        sb.append(", ");
      }
    }

    sb.append(") {\n");

    for (final ElementNode child : this.children()) {
      child.buildToString(sb, indent + 1);
    }
    sb.append(in).append("}\n");
    return sb;
  }
Sets the tag logic that is represented by this tag node.

@param tag the tag logic
@since 4.10.0
text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/internal/parser/node/TagNode.java