Package org.jline.reader.impl
Class SimpleMaskingCallback
java.lang.Object
org.jline.reader.impl.SimpleMaskingCallback
- All Implemented Interfaces:
MaskingCallback
Simple
MaskingCallback
that will replace all the characters in the line with the given mask.
If the given mask is equal to LineReaderImpl.NULL_MASK
then the line will be replaced with an empty String.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SimpleMaskingCallback
-
-
Method Details
-
display
Description copied from interface:MaskingCallback
Transforms the line before it is displayed so that some parts can be hidden.- Specified by:
display
in interfaceMaskingCallback
- Parameters:
line
- the current line being edited- Returns:
- the modified line to display
-
history
Description copied from interface:MaskingCallback
Transforms the line before storing in the history. If the return value is empty or null, it will not be saved in the history.- Specified by:
history
in interfaceMaskingCallback
- Parameters:
line
- the line to be added to history- Returns:
- the modified line
-