The documentation for newProxyInstance determines that its use is equivalent to:
Proxy.getProxyClass(loader, interfaces). getConstructor(new Class[] { InvocationHandler.class }). newInstance(new Object[] { handler });
So, if you want to get more detailed information about loader , you can see the documentation for getProxyClass . Essentially, it simply serves as a class loader, which defines the generated proxy class.
source share