@Test public void testForNameWithThreadContextClassLoader() throws Exception { ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); try { ClassLoader classLoader = Mockito.mock(ClassLoader.class); Thread.currentThread().setContextClassLoader(classLoader); ClassHelper.forNameWithThreadContextClassLoader("a.b.c.D"); verify(classLoader).loadClass("a.b.c.D"); } finally { Thread.currentThread().setContextClassLoader(oldClassLoader); } }
public static Class<?> forNameWithThreadContextClassLoader(String name) throws ClassNotFoundException { return forName(name, Thread.currentThread().getContextClassLoader()); }
ClassHelper { public static Class<?> forNameWithThreadContextClassLoader(String name) throws ClassNotFoundException { return forName(name, Thread.currentThread().getContextClassLoader()); } }
ClassHelper { public static Class<?> forNameWithThreadContextClassLoader(String name) throws ClassNotFoundException { return forName(name, Thread.currentThread().getContextClassLoader()); }  }
ClassHelper { public static Class<?> forNameWithThreadContextClassLoader(String name) throws ClassNotFoundException { return forName(name, Thread.currentThread().getContextClassLoader()); }  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 Class<?> forNameWithThreadContextClassLoader(String name) throws ClassNotFoundException { return forName(name, Thread.currentThread().getContextClassLoader()); }  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; }