private CtClass searchImports(String orgName) throws CompileError { if (orgName.indexOf('.') < 0) { Iterator it = classPool.getImportedPackages(); while (it.hasNext()) { String pac = (String)it.next(); String fqName = pac + '.' + orgName; try { return classPool.get(fqName); } catch (NotFoundException e) { try { if (pac.endsWith("." + orgName)) return classPool.get(pac); } catch (NotFoundException e2) {} } } } getInvalidNames().put(orgName, INVALID); throw new CompileError("no such class: " + orgName); }