Creates a new instance. @return instance of console reader
()
| 36 | * @return instance of console reader |
| 37 | */ |
| 38 | public static ConsoleReader get() { |
| 39 | if(Reflect.available("jline.console.ConsoleReader")) { |
| 40 | try { |
| 41 | return new JLineConsoleReader(); |
| 42 | } catch(final IOException ex) { |
| 43 | throw Util.notExpected(ex); |
| 44 | } |
| 45 | } |
| 46 | return new SimpleConsoleReader(); |
| 47 | } |
| 48 | |
| 49 | /** Simple console reader implementation. */ |
| 50 | private static final class SimpleConsoleReader extends ConsoleReader { |
no test coverage detected