private CtClass obtainCtClassInfo(AOPClassPool pool, String className, byte[] classfileBuffer) throws NotFoundException { try { return pool.getLocally(className); } catch (NotFoundException e) { // todo Bill Burke: this scares the shit out of me, but it must be done // I think it will screw up hotdeployment at some time. Then again, maybe not ;) ByteArrayClassPath cp = new ByteArrayClassPath(className, classfileBuffer); pool.insertClassPath(cp); return pool.getLocally(className); } catch (Error e) { return null; } }