// Visualize an object // Taken: name // type // value (or wrapper, if primitive type) // static void visualize(String name, Class type, Object value) { SystemOut.println("==="); try { vis(name, type, value, ""); } catch (Exception e) { e.printStackTrace(System.out); } }
private static void prt(String s) { // !!TODO: improve readability by changing every occurrence of "java.*.yyy" to "yyy" SystemOut.println(s); }
public static void runTest() { SystemOut.println("TestReflection"); Foo foo = new Foo(); Visualizer.visualize("foo", foo.getClass(), foo); }