Interface PasswordPrompt
- All Superinterfaces:
InputPrompt, Prompt
- All Known Implementing Classes:
DefaultPasswordPrompt
Interface for password prompts.
A password prompt is like an input prompt but masks the input characters.
-
Method Summary
Methods inherited from interface InputPrompt
getCompleter, getDefaultValue, getLineReader, getValidatorMethods inherited from interface Prompt
getFilter, getMessage, getName, getTransformer
-
Method Details
-
getMask
Character getMask()Get the mask character to use for hiding input. If null, uses the default mask character '*'.- Specified by:
getMaskin interfaceInputPrompt- Returns:
- the mask character, or null for default
-
showMask
default boolean showMask()Whether to show the mask character in the post-input display result. Whentrue, the display result shows mask characters for each typed character. Whenfalse, the display result is empty (no visible feedback after input).Note: this controls only the post-input display value returned by
PromptResult.getDisplayResult(), not what is shown during typing. To suppress all visible feedback while typing, usemask('\0').- Returns:
- true to show mask characters in the result, false to hide completely
-