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

    Nested classes/interfaces inherited from interface org.spongepowered.configurate.ConfigurationVisitor

    org.spongepowered.configurate.ConfigurationVisitor.Safe<S extends Object,T extends Object>, org.spongepowered.configurate.ConfigurationVisitor.Stateless<E extends Exception>
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    enterNode(org.spongepowered.configurate.ConfigurationNode node)
     
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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:
      enterNode in interface org.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 tree
      destination - the destination of the comments, any node in a different tree