public synchronized boolean makeProxyClass(Class clazz) throws CannotCompileException, NotFoundException {
  String classname=clazz.getName();
  if (proxyClasses.get(classname) != null)   return false;
 else {
    CtClass ctclazz=produceProxyClass(classPool.get(classname),clazz);
    proxyClasses.put(classname,ctclazz);
    modifySuperclass(ctclazz);
    return true;
  }
}

public synchronized boolean makeProxyClass ( Class clazz ) throws CannotCompileException , NotFoundException { String classname = clazz . getName ( ) ; if ( proxyClasses . get ( classname ) != null ) return false ; else { CtClass ctclazz = produceProxyClass ( classPool . get ( classname ) , clazz ) ; proxyClasses . put ( classname , ctclazz ) ; modifySuperclass ( ctclazz ) ; return true ; } }
makes a proxy class . the produced class is substituted for the original class .
