Skip to content

Commit eb82af4

Browse files
committed
Polish javadocs
1 parent 650f0ae commit eb82af4

File tree

7 files changed

+19
-18
lines changed

7 files changed

+19
-18
lines changed

Diff for: spring-shell-core/src/main/java/org/springframework/shell/ParameterResolverMissingException.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
import org.springframework.core.MethodParameter;
1919

2020
/**
21-
* Thrown when no {@link ParameterResolver} is found for a parameter during a {@link ParameterResolver#resolve}
21+
* Thrown when no ParameterResolver is found for a parameter during a resolve
2222
* operation.
23-
*
23+
*
2424
* @author Camilo Gonzalez
2525
*/
2626
public class ParameterResolverMissingException extends RuntimeException {

Diff for: spring-shell-core/src/main/java/org/springframework/shell/ResultHandlerService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public interface ResultHandlerService {
3333
void handle(@Nullable Object result);
3434

3535
/**
36-
* Handle result to the specified {@ resultType}.
36+
* Handle result to the specified {@link TypeDescriptor}.
3737
*
3838
* @param result the result
3939
* @param resultType the result type

Diff for: spring-shell-core/src/main/java/org/springframework/shell/ValueResult.java

+5-8
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@
1919
import java.util.List;
2020
import java.util.stream.Collectors;
2121

22-
import javax.naming.spi.ResolveResult;
23-
2422
import org.springframework.core.MethodParameter;
2523

2624
/**
27-
* A {@link ResolveResult} for a successful {@link ParameterResolver#resolve} operation.
28-
*
25+
* A result for a successful resolve operation.
26+
*
2927
* @author Camilo Gonzalez
3028
*/
3129
public class ValueResult {
@@ -41,19 +39,18 @@ public class ValueResult {
4139
public ValueResult(MethodParameter methodParameter, Object resolvedValue) {
4240
this(methodParameter, resolvedValue, new BitSet(), new BitSet());
4341
}
44-
42+
4543
public ValueResult(MethodParameter methodParameter, Object resolvedValue, BitSet wordsUsed,
4644
BitSet wordsUsedForValue) {
47-
45+
4846
this.methodParameter = methodParameter;
4947
this.resolvedValue = resolvedValue;
5048
this.wordsUsed = wordsUsed == null ? new BitSet() : wordsUsed;
5149
this.wordsUsedForValue = wordsUsedForValue == null ? new BitSet() : wordsUsedForValue;
5250
}
5351

5452
/**
55-
* The {@link MethodParameter} that was the target of the {@link ParameterResolver#resolve}
56-
* operation.
53+
* The {@link MethodParameter} that was the target of the resolve operation.
5754
*/
5855
public MethodParameter methodParameter() {
5956
return methodParameter;

Diff for: spring-shell-core/src/main/java/org/springframework/shell/command/CommandRegistration.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public interface CommandRegistration {
107107
CommandExitCode getExitCode();
108108

109109
/**
110-
* Gets a new instance of a {@link Buidler}.
110+
* Gets a new instance of a {@link Builder}.
111111
*
112112
* @return a new builder instance
113113
*/
@@ -466,7 +466,7 @@ public interface Builder {
466466
/**
467467
* Define a description text for a command.
468468
*
469-
* @param help the description text
469+
* @param description the description text
470470
* @return builder for chaining
471471
*/
472472
Builder description(String description);

Diff for: spring-shell-core/src/main/java/org/springframework/shell/command/invocation/InvocableShellMethod.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,8 @@ public InvocableShellMethod getResolvedFromHandlerMethod() {
435435

436436
/**
437437
* If the provided instance contains a bean name rather than an object instance,
438-
* the bean name is resolved before a {@link HandlerMethod} is created and returned.
438+
* the bean name is resolved before a {@link InvocableShellMethod} is created and
439+
* returned.
439440
*/
440441
public InvocableShellMethod createWithResolvedBean() {
441442
Object handler = this.bean;

Diff for: spring-shell-core/src/main/java/org/springframework/shell/support/AbstractArgumentMethodArgumentResolver.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,10 @@ private Object resolveEmbeddedValuesAndExpressions(String value) {
179179

180180
/**
181181
* Resolves the given parameter type and value name into an argument value.
182+
*
182183
* @param parameter the method parameter to resolve to an argument value
183184
* @param message the current request
184-
* @param name the name of the value being resolved
185+
* @param names the name of the values being resolved
185186
* @return the resolved argument. May be {@code null}
186187
* @throws Exception in case of errors
187188
*/
@@ -193,6 +194,7 @@ protected abstract Object resolveArgumentInternal(MethodParameter parameter, Mes
193194
* Invoked when a value is required, but {@link #resolveArgumentInternal}
194195
* returned {@code null} and there is no default value. Sub-classes can
195196
* throw an appropriate exception for this case.
197+
*
196198
* @param names the name for the value
197199
* @param parameter the target method parameter
198200
* @param message the message being processed

Diff for: spring-shell-standard/src/main/java/org/springframework/shell/standard/ShellOption.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,11 @@
8080

8181
/**
8282
* Used to indicate to the framework that the given parameter should NOT be resolved by
83-
* {@link StandardParameterResolver}. This is useful if several implementations of
84-
* {@link org.springframework.shell.ParameterResolver} are present, given that the standard one can work with no
83+
* {@code StandardParameterResolver}. This is useful if several implementations of
84+
* {@code org.springframework.shell.ParameterResolver} are present, given that the standard one can work with no
8585
* annotation at all.
86-
* @return true to indicate that the {@link StandardParameterResolver} should not be used for this parameter
86+
* Note that this is not used anymore!
87+
* @return true to indicate that the {@code StandardParameterResolver} should not be used for this parameter
8788
*/
8889
boolean optOut() default false;
8990

0 commit comments

Comments
 (0)