Class AmbiguousNodeException

  • All Implemented Interfaces:
    java.io.Serializable

    public final class AmbiguousNodeException
    extends java.lang.IllegalStateException
    Exception thrown when a CommandContext is being inserted into a CommandTree and an ambiguity is detected.
    See Also:
    Serialized Form
    • Method Summary

      Modifier and Type Method Description
      @NonNull CommandArgument<?,​?> getAmbiguousNode()
      Get the ambiguous node
      @NonNull java.util.List<@NonNull CommandArgument<?,​?>> getChildren()
      Get all children of the parent
      java.lang.String getMessage()  
      @Nullable CommandArgument<?,​?> getParentNode()
      Get the parent node
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AmbiguousNodeException

        public AmbiguousNodeException​(@Nullable CommandArgument<?,​?> parentNode,
                                      @NonNull CommandArgument<?,​?> ambiguousNode,
                                      @NonNull java.util.List<@NonNull CommandArgument<?,​?>> children)
        Construct a new ambiguous node exception
        Parameters:
        parentNode - Parent node
        ambiguousNode - Node that caused exception
        children - All children of the parent
    • Method Detail

      • getParentNode

        public @Nullable CommandArgument<?,​?> getParentNode()
        Get the parent node
        Returns:
        Parent node
      • getAmbiguousNode

        public @NonNull CommandArgument<?,​?> getAmbiguousNode()
        Get the ambiguous node
        Returns:
        Ambiguous node
      • getChildren

        public @NonNull java.util.List<@NonNull CommandArgument<?,​?>> getChildren()
        Get all children of the parent
        Returns:
        Child nodes
      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable