public static final String PROXY_BIND_METHOD = "__$setProxiedInstance$";
public static BuildMetaClass makeProxy(String proxyClassName, MetaClass toProxy) {
if (toProxy.isFinal()) {
throw new UnproxyableClassException(toProxy.getFullyQualifiedName()
+ " is an unproxiable class because it is final");
}
if (!toProxy.isDefaultInstantiable()) {
throw new UnproxyableClassException(toProxy.getFullyQualifiedName() + " must have a default no-arg constructor");
}
ClassStructureBuilder builder = ClassBuilder.define(proxyClassName, toProxy).publicScope()
// .implementsInterface(parameterizedAs(Proxy.class, typeParametersOf(toProxy)))