public static Class loadProxyClass(
     String codeBase, String[] interfaces, ClassLoader defaultLoader)
     throws MalformedURLException, ClassNotFoundException {
   RMIClassLoaderSpi spi = getProviderInstance();
   if (spi == null) spi = getDefaultProviderInstance();
   return spi.loadProxyClass(codeBase, interfaces, defaultLoader);
 }
 /**
  * Loads a class from <code>codeBase</code>.
  *
  * <p>This method delegates to {@link RMIClassLoaderSpi#loadClass(String, String, ClassLoader)}
  * and passes <code>codeBase.toString()</code> as first argument, <code>name</code> as second
  * argument and <code>null</code> as third argument.
  *
  * @param codeBase the code base from which to load the class
  * @param name the name of the class
  * @return the loaded class
  * @throws MalformedURLException if the URL is not well formed
  * @throws ClassNotFoundException if the requested class cannot be found
  */
 public static Class loadClass(URL codeBase, String name)
     throws MalformedURLException, ClassNotFoundException {
   RMIClassLoaderSpi spi = getProviderInstance();
   if (spi == null) spi = getDefaultProviderInstance();
   return spi.loadClass(codeBase.toString(), name, null);
 }
 /**
  * Returns a string representation of the network location where a remote endpoint can get the
  * class-definition of the given class.
  *
  * @param cl
  * @return a space seperated list of URLs where the class-definition of cl may be found
  */
 public static String getClassAnnotation(Class cl) {
   RMIClassLoaderSpi spi = getProviderInstance();
   if (spi == null) spi = getDefaultProviderInstance();
   return spi.getClassAnnotation(cl);
 }
 public static Class loadClass(String codebase, String name, ClassLoader defaultLoader)
     throws MalformedURLException, ClassNotFoundException {
   RMIClassLoaderSpi spi = getProviderInstance();
   if (spi == null) spi = getDefaultProviderInstance();
   return spi.loadClass(codebase, name, defaultLoader);
 }
 /**
  * Gets a classloader for the given codebase and with the current context classloader as parent.
  *
  * @param codebase
  * @return a classloader for the given codebase
  * @throws MalformedURLException if the codebase contains a malformed URL
  */
 public static ClassLoader getClassLoader(String codebase) throws MalformedURLException {
   RMIClassLoaderSpi spi = getProviderInstance();
   if (spi == null) spi = getDefaultProviderInstance();
   return spi.getClassLoader(codebase);
 }