Class ConfigurationCommentMover
java.lang.Object
org.geysermc.geyser.configuration.ConfigurationCommentMover
- All Implemented Interfaces:
org.spongepowered.configurate.ConfigurationVisitor<Void,,Void, RuntimeException> org.spongepowered.configurate.ConfigurationVisitor.Stateless<RuntimeException>
public final class ConfigurationCommentMover
extends Object
implements org.spongepowered.configurate.ConfigurationVisitor.Stateless<RuntimeException>
Moves comments from a different node and puts them on this node
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidenterNode(org.spongepowered.configurate.ConfigurationNode node) static voidmoveComments(@NonNull org.spongepowered.configurate.CommentedConfigurationNode source, @NonNull org.spongepowered.configurate.CommentedConfigurationNode destination) Moves comments from a source node and its children to a destination node and its children (of a different tree), overriding if necessary.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.spongepowered.configurate.ConfigurationVisitor.Stateless
beginVisit, beginVisit, endVisit, endVisit, enterListNode, enterListNode, enterMappingNode, enterMappingNode, enterNode, enterScalarNode, enterScalarNode, exitListNode, exitListNode, exitMappingNode, exitMappingNode, newState
-
Method Details
-
enterNode
public void enterNode(org.spongepowered.configurate.ConfigurationNode node) - Specified by:
enterNodein interfaceorg.spongepowered.configurate.ConfigurationVisitor.Stateless<RuntimeException>
-
moveComments
public static void moveComments(@NonNull org.spongepowered.configurate.CommentedConfigurationNode source, @NonNull org.spongepowered.configurate.CommentedConfigurationNode destination) Moves comments from a source node and its children to a destination node and its children (of a different tree), overriding if necessary. Comments are only moved to the destination node and its children which exist. Comments are only moved to and from nodes with the exact same path.- Parameters:
source- the source of the comments, which must be the topmost parent of a treedestination- the destination of the comments, any node in a different tree
-