#727 finalization - minor javadoc changes

This commit is contained in:
ljacqu 2016-06-04 21:57:31 +02:00
parent 91111ca476
commit 2a4bb483a3
3 changed files with 10 additions and 11 deletions

View File

@ -35,7 +35,7 @@ public class CommandDescription {
*/ */
private String detailedDescription; private String detailedDescription;
/** /**
* The executable command instance described by this object. * The class implementing the command described by this object.
*/ */
private Class<? extends ExecutableCommand> executableCommand; private Class<? extends ExecutableCommand> executableCommand;
/** /**
@ -112,7 +112,7 @@ public class CommandDescription {
} }
/** /**
* Check whether this command description has a specific command. * Check whether this command description has the given label.
* *
* @param commandLabel The label to check for. * @param commandLabel The label to check for.
* *
@ -128,9 +128,9 @@ public class CommandDescription {
} }
/** /**
* Return the {@link ExecutableCommand} instance defined by the command description. * Return the {@link ExecutableCommand} class implementing this command.
* *
* @return The executable command object. * @return The executable command class
*/ */
public Class<? extends ExecutableCommand> getExecutableCommand() { public Class<? extends ExecutableCommand> getExecutableCommand() {
return executableCommand; return executableCommand;
@ -139,7 +139,7 @@ public class CommandDescription {
/** /**
* Return the parent. * Return the parent.
* *
* @return The parent command, or null for base commands. * @return The parent command, or null for base commands
*/ */
public CommandDescription getParent() { public CommandDescription getParent() {
return parent; return parent;

View File

@ -16,8 +16,8 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
/** /**
* The AuthMe command handler, responsible for mapping incoming commands to the correct {@link CommandDescription} * The AuthMe command handler, responsible for invoking the correct {@link ExecutableCommand} based on incoming
* or to display help messages for unknown invocations. * command labels or for displaying a help message for unknown command labels.
*/ */
public class CommandHandler { public class CommandHandler {
@ -88,7 +88,7 @@ public class CommandHandler {
} }
/** /**
* Initializes all required ExecutableCommand objects. * Initialize all required ExecutableCommand objects.
* *
* @param commandClasses the classes to instantiate * @param commandClasses the classes to instantiate
*/ */

View File

@ -17,8 +17,7 @@ import static fr.xephi.authme.command.FoundResultStatus.MISSING_BASE_COMMAND;
import static fr.xephi.authme.command.FoundResultStatus.UNKNOWN_LABEL; import static fr.xephi.authme.command.FoundResultStatus.UNKNOWN_LABEL;
/** /**
* The AuthMe command handler, responsible for mapping incoming * Maps incoming command parts to the correct {@link CommandDescription}.
* command parts to the correct {@link CommandDescription}.
*/ */
public class CommandMapper { public class CommandMapper {
@ -159,7 +158,7 @@ public class CommandMapper {
private static FoundCommandResult transformResultForHelp(FoundCommandResult result) { private static FoundCommandResult transformResultForHelp(FoundCommandResult result) {
if (result.getCommandDescription() != null if (result.getCommandDescription() != null
&& HELP_COMMAND_CLASS.isAssignableFrom(result.getCommandDescription().getExecutableCommand())) { && HELP_COMMAND_CLASS == result.getCommandDescription().getExecutableCommand()) {
// For "/authme help register" we have labels = [authme, help] and arguments = [register] // For "/authme help register" we have labels = [authme, help] and arguments = [register]
// But for the help command we want labels = [authme, help] and arguments = [authme, register], // But for the help command we want labels = [authme, help] and arguments = [authme, register],
// so we can use the arguments as the labels to the command to show help for // so we can use the arguments as the labels to the command to show help for