Use JCommander resolver in combination with others.

Prepare for implementation of describe()
This commit is contained in:
Eric Bottard
2017-06-22 16:06:19 +02:00
parent 14b2401374
commit e49ee885ef
12 changed files with 137 additions and 20 deletions

View File

@@ -17,6 +17,7 @@
package org.springframework.shell2;
import java.util.List;
import java.util.stream.Stream;
import org.springframework.core.MethodParameter;
@@ -39,8 +40,10 @@ public interface ParameterResolver {
/**
* Describe a supported parameter, so that integrated help can be generated.
* <p>Typical implementations will return a one element stream result, but some may return several (for
* example if binding several words to a POJO).</p>
*/
ParameterDescription describe(MethodParameter parameter);
Stream<ParameterDescription> describe(MethodParameter parameter);
/**
* Invoked during TAB completion. If the {@link CompletionContext} can be interpreted as the start