Package org.springframework.shell.jline
Class JLineInputReader
java.lang.Object
org.springframework.shell.jline.JLineInputReader
- All Implemented Interfaces:
InputReader
Implementation of
InputReader that reads input using JLine's
LineReader.- Since:
- 4.0.0
- Author:
- Mahmoud Ben Hassine
-
Constructor Summary
ConstructorsConstructorDescriptionJLineInputReader(org.jline.reader.LineReader lineReader) Create a newJLineInputReaderinstance. -
Method Summary
Modifier and TypeMethodDescriptionRead a line of input from the user.Read a line of input from the user with a prompt.char[]Read a password from the user.char[]readPassword(String prompt) Read a password from the user with a prompt.
-
Constructor Details
-
JLineInputReader
public JLineInputReader(org.jline.reader.LineReader lineReader) Create a newJLineInputReaderinstance.- Parameters:
lineReader- the JLine line reader
-
-
Method Details
-
readInput
Description copied from interface:InputReaderRead a line of input from the user.- Specified by:
readInputin interfaceInputReader- Returns:
- the input line
-
readInput
Description copied from interface:InputReaderRead a line of input from the user with a prompt.- Specified by:
readInputin interfaceInputReader- Parameters:
prompt- the prompt to display to the user- Returns:
- the input line
-
readPassword
public char[] readPassword()Description copied from interface:InputReaderRead a password from the user.- Specified by:
readPasswordin interfaceInputReader- Returns:
- the password as a character array
-
readPassword
Description copied from interface:InputReaderRead a password from the user with a prompt.- Specified by:
readPasswordin interfaceInputReader- Parameters:
prompt- the prompt to display to the user- Returns:
- the password as a character array
-