code: protected Class<?> resolveProxyClass(String[] interfaceNames)
              throws IOException, ClassNotFoundException {
          ClassLoader loader = callerClassLoader;
          Class<?>[] interfaces = new Class<?>[interfaceNames.length];
          for (int i = 0; i < interfaceNames.length; i++) {
              interfaces[i] = Class.forName(interfaceNames[i], false, loader);
          }
          try {
              return Proxy.getProxyClass(loader, interfaces);
          } catch (IllegalArgumentException e) {
              throw new ClassNotFoundException(e.toString(), e);
          }
      }
docs: Creates the proxy class that implements the interfaces specified in
  {@code interfaceNames}.
  
  @param interfaceNames
  the interfaces used to create the proxy class.
  @return the proxy class.
  @throws ClassNotFoundException
  if the proxy class or any of the specified interfaces cannot
  be created.
  @throws IOException
  if an error occurs while reading from the source stream.
  @see ObjectOutputStream#annotateProxyClass(Class)