(@Self Object obj)
| 9 | @BTrace public class HistoProbe { |
| 10 | private static Map<String, AtomicInteger> histo = newHashMap(); |
| 11 | @OnMethod(clazz = "javax.swing.JComponent", method = "<init>") |
| 12 | public static void onMethod(@Self Object obj) { |
| 13 | String cn = name(classOf(obj)); |
| 14 | AtomicInteger ai = get((Map<String, AtomicInteger>)histo, cn); |
| 15 | if (ai == null) { |
| 16 | ai = newAtomicInteger(1); |
| 17 | put(histo, cn, ai); |
| 18 | } else { |
| 19 | incrementAndGet(ai); // WORKS if commented out |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | @OnTimer(1000) |
| 24 | public static void print() { |
nothing calls this directly
no test coverage detected