private Class<?> findClassInComponents(final String name) throws ClassNotFoundException { final String classFilename = this.getClassFilename(name); final Enumeration<File> e = this.pathComponents.elements(); while (e.hasMoreElements()) { final File pathComponent = e.nextElement(); InputStream stream = null; try { stream = this.getResourceStream(pathComponent, classFilename); if (stream != null) { this.log("Loaded from " + pathComponent + " " + classFilename, 4); return this.getClassFromStream(stream, name, pathComponent); } continue; } catch (SecurityException se) { throw se; } catch (IOException ioe) { this.log( "Exception reading component " + pathComponent + " (reason: " + ioe.getMessage() + ")", 3); } finally { FileUtils.close(stream); } } throw new ClassNotFoundException(name); }