@Experimental public interface Prompter extends Service
Modifier and Type | Method and Description |
---|---|
default String |
prompt(String message)
Prompts the user for a string.
|
default String |
prompt(String message,
List<String> possibleValues)
Prompts the user for a string using a list of possible values.
|
String |
prompt(String message,
List<String> possibleValues,
String defaultReply)
Prompts the user for a string using a list of possible values and a default reply.
|
default String |
prompt(String message,
String defaultReply)
Prompts the user for a string using a default value.
|
String |
promptForPassword(String message)
Prompts the user for a password.
|
void |
showMessage(String message)
Displays a message to the user.
|
default String prompt(String message) throws PrompterException
message
- the message to display to the userPrompterException
- if an exception occursdefault String prompt(String message, String defaultReply) throws PrompterException
message
- the message to displaydefaultReply
- the default reply valuePrompterException
- if an exception occursdefault String prompt(String message, List<String> possibleValues) throws PrompterException
message
- the message to displaypossibleValues
- the list of possible valuesPrompterException
- if an exception occursString prompt(String message, List<String> possibleValues, String defaultReply) throws PrompterException
message
- the message to displaypossibleValues
- the list of possible valuesdefaultReply
- the default reply valuePrompterException
- if an exception occursString promptForPassword(String message) throws PrompterException
message
- the message to displayPrompterException
- if an exception occursvoid showMessage(String message) throws PrompterException
message
- the message to displayPrompterException
- if an exception occursCopyright © 2001–2022 The Apache Software Foundation. All rights reserved.