@return a wrapper for a java.io.PrintStream, typically System#out.
()
| 293 | * @return a wrapper for a {@link java.io.PrintStream}, typically {@link System#out}. |
| 294 | */ |
| 295 | public synchronized Console getConsole() { |
| 296 | if (console == null) { |
| 297 | try { |
| 298 | Method consoleMethod = System.class.getDeclaredMethod("console"); |
| 299 | Object console = consoleMethod.invoke(null); |
| 300 | this.console = new JDK6Console(console); |
| 301 | } catch (Throwable t) { |
| 302 | console = new DefaultConsole(); |
| 303 | } |
| 304 | } |
| 305 | return console; |
| 306 | } |
| 307 | |
| 308 | /** |
| 309 | * Adds the provided arg object to the set of objects that this commander |
no outgoing calls
no test coverage detected