diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/Command.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/Command.java index 62af739fa5b..7c97f4224b6 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/Command.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/Command.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2014 the original author or authors. + * Copyright 2012-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,11 +33,13 @@ public interface Command { /** * Returns the name of the command. + * @return the command's name */ String getName(); /** * Returns a description of the command. + * @return the command's description */ String getDescription(); @@ -45,29 +47,34 @@ public interface Command { * Returns usage help for the command. This should be a simple one-line string * describing basic usage. e.g. '[options] <file>'. Do not include the name of * the command in this string. + * @return the command's usage help */ String getUsageHelp(); /** * Gets full help text for the command, e.g. a longer description and one line per * option. + * @return the command's help text */ String getHelp(); /** * Returns help for each supported option. + * @return help for each of the command's options */ Collection getOptionsHelp(); /** * Return some examples for the command. + * @return the command's examples */ Collection getExamples(); /** * Run the command. * @param args command arguments (this will not include the command itself) - * @throws Exception + * @throws Exception if the command fails + * @return the outcome of the command */ ExitStatus run(String... args) throws Exception; diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/CommandException.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/CommandException.java index b5d36a09f44..1fce92fd54e 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/CommandException.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/CommandException.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2014 the original author or authors. + * Copyright 2012-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -80,7 +80,8 @@ public class CommandException extends RuntimeException { } /** - * Returns options a set of options that are understood by the {@link CommandRunner}. + * Returns a set of options that are understood by the {@link CommandRunner}. + * @return the options understood by the runner */ public Set