Add javadoc and sources generation

This commit is contained in:
Eric Bottard
2017-08-10 12:19:32 +02:00
parent 8753aa96b1
commit a4ff679e76
4 changed files with 41 additions and 2 deletions

View File

@@ -42,6 +42,7 @@ public @interface ShellComponent {
/**
* Used to indicate a suggestion for a logical name for the component.
* @return the suggested component name, if any
*/
String value() default "";
}

View File

@@ -36,17 +36,20 @@ public @interface ShellMethod {
/**
* The name(s) by which this method can be invoked via Spring Shell. If not specified, the actual method name
* will be used (turning camelCase humps into "-").
* @return explicit command name(s) to use
*/
String[] key() default {};
/**
* A description for the command. Should not contain any formatting (e.g. html) characters and would typically
* start with a capital letter and end with a dot.
* @return short description of what the command does
*/
String value() default "";
/**
* The prefix to use for assigning parameters by name.
* @return prefix to use when not specified as part of the parameter annotation
*/
String prefix() default "--";

View File

@@ -43,24 +43,29 @@ public @interface ShellOption {
int ARITY_USE_HEURISTICS = -1;
/**
* The key(s) (without the {@link ShellMethod#prefix()}) by which this parameter can be referenced
* when using named parameters. If none is specified, the actual method parameter name will be used.
* The key(s) by which this parameter can be referenced
* when using named parameters. If none is specified, the actual method parameter name will be used, prefixed by the
* method {@link ShellMethod#prefix()}.
* @return explicit key(s) to use to pass a value for this parameter
*/
String[] value() default {};
/**
* Return the number of input "words" this parameter consumes. Default is 1, except when parameter type is boolean,
* in which case it is 0.
* @return the number of words to map to this parameter
*/
int arity() default ARITY_USE_HEURISTICS;
/**
* The textual (pre-conversion) value to assign to this parameter if no value is provided by the user.
* @return the default value for this parameter
*/
String defaultValue() default NONE;
/**
* Return a short description of the parameter.
* @return description of the parameter
*/
String help() default "";
@@ -71,6 +76,7 @@ public @interface ShellOption {
* {@link StandardParameterResolver}. This is useful if several implementations of
* {@link org.springframework.shell.ParameterResolver} are present, given that the standard one can work with no
* annotation at all.
* @return true to indicate that the {@link StandardParameterResolver} should not be used for this parameter
*/
boolean optOut() default false;