/** * Allows exploration of a reflected universe in an interactive environment. */ public static void main(String[] args) throws IOException { ReflectedUniverse r = new ReflectedUniverse(); System.out.println("Reflected universe test environment. " + "Type commands, or press ^D to quit."); if (args.length > 0) { r.setAccessibilityIgnored(true); System.out.println("Ignoring accessibility modifiers."); } BufferedReader in = new BufferedReader(new InputStreamReader(System.in, Constants.ENCODING)); while (true) { System.out.print("> "); String line = in.readLine(); if (line == null) break; try { r.exec(line); } catch (ReflectException exc) { LOGGER.debug("Could not execute '{}'", line, exc); } } System.out.println(); }
/** * Allows exploration of a reflected universe in an interactive environment. * * @param args if non-empty, access modifiers will be ignored * @throws IOException if there is an error reading from stdin */ public static void main(String[] args) throws IOException { ReflectedUniverse r = new ReflectedUniverse(); System.out.println("Reflected universe test environment. " + "Type commands, or press ^D to quit."); if (args.length > 0) { r.setAccessibilityIgnored(true); System.out.println("Ignoring accessibility modifiers."); } BufferedReader in = new BufferedReader(new InputStreamReader(System.in, Constants.ENCODING)); while (true) { System.out.print("> "); String line = in.readLine(); if (line == null) break; try { r.exec(line); } catch (ReflectException exc) { LOGGER.debug("Could not execute '{}'", line, exc); } } System.out.println(); }