Debug { public static String shortName(Class<?> c) { if (c == null) { return null; } return c.getName().substring(c.getName().lastIndexOf('.') + 1); }  static String toMemorableString(long num); static String objectId(Object o); static String abbreviatedName(Class<?> c); static String shortName(Class<?> c);  }
@Test public void testShortNameWithInnerClass() { assertEquals("Map$Entry", Debug.shortName(Map.Entry.class)); }
@Test public void testShortNameInDefaultPackage() throws Exception { assertEquals("NaughtyClassInDefaultPackage", Debug.shortName(Class.forName("NaughtyClassInDefaultPackage"))); }