Polish javadocs

This commit is contained in:
Janne Valkealahti
2022-08-18 08:34:13 +01:00
parent 650f0ae3a5
commit eb82af42ed
7 changed files with 19 additions and 18 deletions

View File

@@ -18,9 +18,9 @@ package org.springframework.shell;
import org.springframework.core.MethodParameter;
/**
* Thrown when no {@link ParameterResolver} is found for a parameter during a {@link ParameterResolver#resolve}
* Thrown when no ParameterResolver is found for a parameter during a resolve
* operation.
*
*
* @author Camilo Gonzalez
*/
public class ParameterResolverMissingException extends RuntimeException {

View File

@@ -33,7 +33,7 @@ public interface ResultHandlerService {
void handle(@Nullable Object result);
/**
* Handle result to the specified {@ resultType}.
* Handle result to the specified {@link TypeDescriptor}.
*
* @param result the result
* @param resultType the result type

View File

@@ -19,13 +19,11 @@ import java.util.BitSet;
import java.util.List;
import java.util.stream.Collectors;
import javax.naming.spi.ResolveResult;
import org.springframework.core.MethodParameter;
/**
* A {@link ResolveResult} for a successful {@link ParameterResolver#resolve} operation.
*
* A result for a successful resolve operation.
*
* @author Camilo Gonzalez
*/
public class ValueResult {
@@ -41,10 +39,10 @@ public class ValueResult {
public ValueResult(MethodParameter methodParameter, Object resolvedValue) {
this(methodParameter, resolvedValue, new BitSet(), new BitSet());
}
public ValueResult(MethodParameter methodParameter, Object resolvedValue, BitSet wordsUsed,
BitSet wordsUsedForValue) {
this.methodParameter = methodParameter;
this.resolvedValue = resolvedValue;
this.wordsUsed = wordsUsed == null ? new BitSet() : wordsUsed;
@@ -52,8 +50,7 @@ public class ValueResult {
}
/**
* The {@link MethodParameter} that was the target of the {@link ParameterResolver#resolve}
* operation.
* The {@link MethodParameter} that was the target of the resolve operation.
*/
public MethodParameter methodParameter() {
return methodParameter;

View File

@@ -107,7 +107,7 @@ public interface CommandRegistration {
CommandExitCode getExitCode();
/**
* Gets a new instance of a {@link Buidler}.
* Gets a new instance of a {@link Builder}.
*
* @return a new builder instance
*/
@@ -466,7 +466,7 @@ public interface CommandRegistration {
/**
* Define a description text for a command.
*
* @param help the description text
* @param description the description text
* @return builder for chaining
*/
Builder description(String description);

View File

@@ -435,7 +435,8 @@ public class InvocableShellMethod {
/**
* If the provided instance contains a bean name rather than an object instance,
* the bean name is resolved before a {@link HandlerMethod} is created and returned.
* the bean name is resolved before a {@link InvocableShellMethod} is created and
* returned.
*/
public InvocableShellMethod createWithResolvedBean() {
Object handler = this.bean;

View File

@@ -179,9 +179,10 @@ public abstract class AbstractArgumentMethodArgumentResolver implements HandlerM
/**
* Resolves the given parameter type and value name into an argument value.
*
* @param parameter the method parameter to resolve to an argument value
* @param message the current request
* @param name the name of the value being resolved
* @param names the name of the values being resolved
* @return the resolved argument. May be {@code null}
* @throws Exception in case of errors
*/
@@ -193,6 +194,7 @@ public abstract class AbstractArgumentMethodArgumentResolver implements HandlerM
* Invoked when a value is required, but {@link #resolveArgumentInternal}
* returned {@code null} and there is no default value. Sub-classes can
* throw an appropriate exception for this case.
*
* @param names the name for the value
* @param parameter the target method parameter
* @param message the message being processed

View File

@@ -80,10 +80,11 @@ public @interface ShellOption {
/**
* Used to indicate to the framework that the given parameter should NOT be resolved by
* {@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
* {@code StandardParameterResolver}. This is useful if several implementations of
* {@code 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
* Note that this is not used anymore!
* @return true to indicate that the {@code StandardParameterResolver} should not be used for this parameter
*/
boolean optOut() default false;