1. Proxy.newProxyInstance
2. Class<?> cl = getProxyClass0(loader, interfaces);
3. private static final WeakCache<ClassLoader, Class<?>[], Class<?>>
proxyClassCache = new WeakCache<>(new KeyFactory(), new ProxyClassFactory());
4.value = Objects.requireNonNull(valueFactory.apply(key, parameter));
5.interfaceClass = Class.forName(intf.getName(), false, loader);
6.Verify that the Class object actually represents an interface [限制只能是接口]
7. byte[] proxyClassFile = ProxyGenerator.generateProxyClass(
proxyName, interfaces, accessFlags);
8.return defineClass0(loader, proxyName,
proxyClassFile, 0, proxyClassFile.length);
展开