@Test public void testToShortString() throws Exception { assertThat(toShortString(null), equalTo("null")); assertThat(toShortString(new ClassHelperTest()), startsWith("ClassHelperTest@")); }
public static String toShortString(Object obj) { if (obj == null) { return "null"; } return obj.getClass().getSimpleName() + "@" + System.identityHashCode(obj); }
ClassHelper { public static String toShortString(Object obj) { if (obj == null) { return "null"; } return obj.getClass().getSimpleName() + "@" + System.identityHashCode(obj); } }
ClassHelper { public static String toShortString(Object obj) { if (obj == null) { return "null"; } return obj.getClass().getSimpleName() + "@" + System.identityHashCode(obj); }  }
ClassHelper { public static String toShortString(Object obj) { if (obj == null) { return "null"; } return obj.getClass().getSimpleName() + "@" + System.identityHashCode(obj); }  static Class<?> forNameWithThreadContextClassLoader(String name); static Class<?> forNameWithCallerClassLoader(String name, Class<?> caller); static ClassLoader getCallerClassLoader(Class<?> caller); static ClassLoader getClassLoader(Class<?> cls); static ClassLoader getClassLoader(); static Class<?> forName(String name); static Class<?> forName(String name, ClassLoader classLoader); static Class<?> resolvePrimitiveClassName(String name); static String toShortString(Object obj); }
ClassHelper { public static String toShortString(Object obj) { if (obj == null) { return "null"; } return obj.getClass().getSimpleName() + "@" + System.identityHashCode(obj); }  static Class<?> forNameWithThreadContextClassLoader(String name); static Class<?> forNameWithCallerClassLoader(String name, Class<?> caller); static ClassLoader getCallerClassLoader(Class<?> caller); static ClassLoader getClassLoader(Class<?> cls); static ClassLoader getClassLoader(); static Class<?> forName(String name); static Class<?> forName(String name, ClassLoader classLoader); static Class<?> resolvePrimitiveClassName(String name); static String toShortString(Object obj); static final String ARRAY_SUFFIX; }