TypeSet { public Class<?> findClass(String name) { if (resolvers.isEmpty()) { buildResolvers(); } for (final Resolver resolver : resolvers) { if (resolver.couldResolve(name)) { try { return resolver.resolve(name); } catch (ClassNotFoundException ignored) { } catch (LinkageError le) { return null; } } } return null; } TypeSet();  TypeSet(ClassLoader classLoader); boolean hasAuxclasspath(); void setASTCompilationUnitPackage(String pkg); String getASTCompilationUnitPackage(); void addImport(String importString); int getImportsCount(); Set<String> getExplicitImports(); Class<?> findClass(String name);  }
@Test public void testFindClassImplicitImport() throws ClassNotFoundException { TypeSet t = new TypeSet(); Class<?> clazz = t.findClass("String"); assertEquals(String.class, clazz); }
@Test public void testFindClassPrimitive() throws ClassNotFoundException { TypeSet t = new TypeSet(); assertEquals(int.class, t.findClass("int")); }
@Test public void testFindClassVoid() throws ClassNotFoundException { TypeSet t = new TypeSet(); assertEquals(void.class, t.findClass("void")); }
@Test public void testFindFullyQualified() throws ClassNotFoundException { TypeSet t = new TypeSet(); assertEquals(String.class, t.findClass("java.lang.String")); assertEquals(Set.class, t.findClass("java.util.Set")); }