From 14baf5b87663dd18be2fbb482f5869faf283b940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Thu, 14 Jan 2021 08:37:34 +0100 Subject: [PATCH] :books: Improve CommandSyntaxFormatter documentation --- .../arguments/CommandSyntaxFormatter.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cloud-core/src/main/java/cloud/commandframework/arguments/CommandSyntaxFormatter.java b/cloud-core/src/main/java/cloud/commandframework/arguments/CommandSyntaxFormatter.java index 5255ade7..ea1d5393 100644 --- a/cloud-core/src/main/java/cloud/commandframework/arguments/CommandSyntaxFormatter.java +++ b/cloud-core/src/main/java/cloud/commandframework/arguments/CommandSyntaxFormatter.java @@ -40,9 +40,13 @@ public interface CommandSyntaxFormatter { /** * Format the command arguments into a syntax string * - * @param commandArguments Command arguments - * @param node Trailing node - * @return Syntax string + * @param commandArguments Command arguments that have been unambiguously specified up until this point. This + * should include the "current" command, if such a command exists. + * @param node The current command node. The children of this node will be appended onto the + * command syntax string, as long as an unambiguous path can be identified. The node + * itself will not be appended onto the syntax string. This can be set to {@code null} if + * no node is relevant at the point of formatting. + * @return The formatted syntax string */ @NonNull String apply( @NonNull List<@NonNull CommandArgument> commandArguments,