String remoteType = type.getName() + "$Remote";
try {
return (Class<T>) Class.forName(remoteType, true, type.getClassLoader());
} catch (ClassNotFoundException e) {
ClassPool pool = ClassGenerator.getClassPool(type.getClassLoader());
CtClass ctClass = pool.makeInterface(remoteType);
// ctClass.addInterface(pool.getCtClass(type.getName()));
ctClass.addInterface(pool.getCtClass(Remote.class.getName()));
Method[] methods = type.getMethods();
for (Method method : methods) {
CtClass[] parameters = new CtClass[method.getParameterTypes().length];