public class Shell extends Object
| Modifier and Type | Field and Description | 
|---|---|
| protected List<CompletionResolver> | completionResolvers | 
| static Object | NO_INPUTMarker object returned to signify that there was no input to turn into a command
 execution. | 
| protected static Object | UNRESOLVEDMarker object to distinguish unresolved arguments from  null, which is a valid
 value. | 
| Constructor and Description | 
|---|
| Shell(ResultHandlerService resultHandlerService,
     CommandCatalog commandRegistry,
     org.jline.terminal.Terminal terminal,
     ShellContext shellContext,
     ExitCodeMappings exitCodeMappings) | 
| Modifier and Type | Method and Description | 
|---|---|
| List<CompletionProposal> | complete(CompletionContext context)Gather completion proposals given some (incomplete) input the user has already typed
 in. | 
| Object | evaluate(Input input)Evaluate a single "line" of input from the user by trying to map words to a command and
 arguments. | 
| void | run(InputProvider inputProvider)The main program loop: acquire input, try to match it to a command and evaluate. | 
| void | setArgumentResolvers(CommandExecution.CommandExecutionHandlerMethodArgumentResolvers argumentResolvers) | 
| void | setCompletionResolvers(List<CompletionResolver> resolvers) | 
| void | setConversionService(org.springframework.core.convert.ConversionService shellConversionService) | 
| void | setValidatorFactory(javax.validation.ValidatorFactory validatorFactory) | 
public static final Object NO_INPUT
protected List<CompletionResolver> completionResolvers
protected static final Object UNRESOLVED
null, which is a valid
 value.public Shell(ResultHandlerService resultHandlerService, CommandCatalog commandRegistry, org.jline.terminal.Terminal terminal, ShellContext shellContext, ExitCodeMappings exitCodeMappings)
@Autowired public void setCompletionResolvers(List<CompletionResolver> resolvers)
@Autowired public void setArgumentResolvers(CommandExecution.CommandExecutionHandlerMethodArgumentResolvers argumentResolvers)
public void setConversionService(org.springframework.core.convert.ConversionService shellConversionService)
@Autowired(required=false) public void setValidatorFactory(javax.validation.ValidatorFactory validatorFactory)
public void run(InputProvider inputProvider) throws Exception
ResultHandler causes the process to exit or there is no input.
 This method has public visibility so that it can be invoked by actual commands (e.g. a script command).
Exceptionpublic Object evaluate(Input input)
This method does not throw exceptions, it catches them and returns them as a regular result
public List<CompletionProposal> complete(CompletionContext context)
Copyright © 2022. All rights reserved.