@Component(role=Prompter.class, instantiationStrategy="per-lookup") public class PrompterImpl extends Object implements Prompter
Prompter implementation.| Modifier and Type | Field and Description |
|---|---|
private jline.console.ConsoleReader |
console |
| Constructor and Description |
|---|
PrompterImpl() |
PrompterImpl(InputStream in,
OutputStream out) |
| Modifier and Type | Method and Description |
|---|---|
jline.console.ConsoleReader |
getConsole() |
String |
prompt(String message)
Prompt user for a string.
|
String |
prompt(String message,
Character mask) |
String |
promptWithDefaultValue(String message,
String defaultValue)
Prompt user for a string; if user response is blank use a default value.
|
public PrompterImpl()
throws IOException
IOExceptionpublic PrompterImpl(InputStream in, OutputStream out) throws IOException
IOExceptionpublic jline.console.ConsoleReader getConsole()
public String prompt(String message, Character mask) throws IOException
IOExceptionpublic String prompt(String message) throws IOException
Prompterprompt in interface PrompterIOExceptionpublic String promptWithDefaultValue(String message, String defaultValue) throws IOException
PrompterpromptWithDefaultValue in interface PrompterIOExceptionCopyright © 2018. All rights reserved.