public Class<?> findClass(String name) throws ClassNotFoundException {

			try {
				CtClass cc = pool.get(name);

				// remove final modifier from the class
				if (Modifier.isFinal(cc.getModifiers())) {
					cc.setModifiers(cc.getModifiers() & ~Modifier.FINAL);
				}
				// remove final modifiers from all methods
				CtMethod[] methods = cc.getDeclaredMethods();
				for (CtMethod method : methods) {
					if (Modifier.isFinal(method.getModifiers())) {
						method.setModifiers(method.getModifiers()
								& ~Modifier.FINAL);
					}
				}

				byte[] b = cc.toBytecode();

				Class<?> result = defineClass(name, b, 0, b.length);

				return result;
			} catch (NotFoundException e) {
				throw new ClassNotFoundException();
			} catch (IOException e) {
				throw new ClassNotFoundException();
			} catch (CannotCompileException e) {
				throw new ClassNotFoundException();
			}
		}