Class DefaultPasswordPrompt
java.lang.Object
org.jline.prompt.impl.DefaultPrompt
org.jline.prompt.impl.DefaultInputPrompt
org.jline.prompt.impl.DefaultPasswordPrompt
- All Implemented Interfaces:
InputPrompt, PasswordPrompt, Prompt
Default implementation of PasswordPrompt interface.
-
Field Summary
Fields inherited from class DefaultPrompt
message, name -
Constructor Summary
ConstructorsConstructorDescriptionDefaultPasswordPrompt(String name, String message) DefaultPasswordPrompt(String name, String message, Character mask) DefaultPasswordPrompt(String name, String message, Character mask, boolean showMask) DefaultPasswordPrompt(String name, String message, String defaultValue, Character mask, boolean showMask) -
Method Summary
Methods inherited from class DefaultInputPrompt
getDefaultValue, getLineReader, getValidatorMethods inherited from class DefaultPrompt
getFilter, getMessage, getName, getTransformer, setFilter, setTransformerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface InputPrompt
getDefaultValue, getLineReader, getValidatorMethods inherited from interface Prompt
getFilter, getMessage, getName, getTransformer
-
Constructor Details
-
DefaultPasswordPrompt
-
DefaultPasswordPrompt
-
DefaultPasswordPrompt
-
DefaultPasswordPrompt
-
-
Method Details
-
showMask
public boolean showMask()Description copied from interface:PasswordPromptWhether 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').- Specified by:
showMaskin interfacePasswordPrompt- Returns:
- true to show mask characters in the result, false to hide completely
-
getMask
Description copied from interface:InputPromptGet the mask character for the input.- Specified by:
getMaskin interfaceInputPrompt- Specified by:
getMaskin interfacePasswordPrompt- Overrides:
getMaskin classDefaultInputPrompt- Returns:
- the mask character, or null if masking is disabled
-
getCompleter
public org.jline.reader.Completer getCompleter()Description copied from interface:InputPromptGet the completer.- Specified by:
getCompleterin interfaceInputPrompt- Overrides:
getCompleterin classDefaultInputPrompt- Returns:
- the completer
-