try {
CtClass cc = classPool.get( name );
// todo : modify the class definition if not already transformed...
byte[] b = cc.toBytecode();
return defineClass( name, b, 0, b.length );
}
catch ( NotFoundException e ) {
throw new ClassNotFoundException();
}
catch ( IOException e ) {
throw new ClassNotFoundException();
}
catch ( CannotCompileException e ) {
throw new ClassNotFoundException();
}