// add target object field to class
CtField field = new CtField( target, "m_dynTarget", clas );
clas.addField( field );
// add public default constructor method to class
CtConstructor cons = new CtConstructor( NO_ARGS, clas );
cons.setBody( "m_dynTarget = new " + tClasName + "();" );
clas.addConstructor( cons );
// add public <code>createCopy</code> method
CtMethod ctMeth = new CtMethod( ctIDynProxy, "createCopy", NO_ARGS, clas );
ctMeth.setBody( "return new " + proxyName + "();" );