From 54e90c03fc107296d8ea550ff615d4a50ff8927c Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 4 Feb 2015 14:00:44 +0000 Subject: [PATCH] Polish the javadoc in spring-boot-cli Add missing @param and @return elements --- .../boot/cli/command/Command.java | 11 ++++++-- .../boot/cli/command/CommandException.java | 5 ++-- .../boot/cli/command/CommandRunner.java | 8 +++--- .../cli/command/init/InitializrService.java | 7 ++++- .../init/InitializrServiceMetadata.java | 11 ++++++-- .../init/ProjectGenerationRequest.java | 26 ++++++++++++++----- .../init/ProjectGenerationResponse.java | 5 +++- .../ServiceCapabilitiesReportGenerator.java | 9 ++++--- .../boot/cli/command/options/OptionHelp.java | 4 ++- .../SpringApplicationRunnerConfiguration.java | 4 ++- .../boot/cli/command/shell/ShellPrompts.java | 3 ++- .../boot/cli/compiler/AstUtils.java | 21 +++++++++++++-- .../compiler/CompilerAutoConfiguration.java | 19 +++++++++++--- .../cli/compiler/DependencyCustomizer.java | 10 ++++--- .../boot/cli/compiler/GroovyCompiler.java | 3 ++- .../compiler/GroovyCompilerConfiguration.java | 13 +++++++--- .../grape/ManagedDependenciesFactory.java | 3 ++- ...ositorySystemSessionAutoConfiguration.java | 4 ++- 18 files changed, 129 insertions(+), 37 deletions(-) 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