/[classpath]/classpath/java/rmi/server/RMIClassLoader.java
ViewVC logotype

Diff of /classpath/java/rmi/server/RMIClassLoader.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by rabbit78, Wed Sep 28 19:51:31 2005 UTC revision 1.19 by rabbit78, Thu Sep 29 13:13:07 2005 UTC
# Line 41  package java.rmi.server; Line 41  package java.rmi.server;
41  import gnu.java.rmi.server.RMIClassLoaderImpl;  import gnu.java.rmi.server.RMIClassLoaderImpl;
42    
43  import java.net.MalformedURLException;  import java.net.MalformedURLException;
44    import java.net.URL;
45    
46  /**  /**
47   * This class provides a set of public static utility methods for supporting   * This class provides a set of public static utility methods for supporting
# Line 84  public class RMIClassLoader Line 85  public class RMIClassLoader
85    }    }
86    
87    /**    /**
88       * Loads a class from <code>codeBase</code>.
89       *
90       * This method delegates to
91       * {@link RMIClassLoaderSpi#loadClass(String, String, ClassLoader)} and
92       * passes <code>codeBase.toString()</code> as first argument,
93       * <code>name</code> as second argument and <code>null</code> as third
94       * argument.
95       *
96       * @param codeBase the code base from which to load the class
97       * @param name the name of the class
98       *
99       * @return the loaded class
100       *
101       * @throws MalformedURLException if the URL is not well formed
102       * @throws ClassNotFoundException if the requested class cannot be found
103       */
104      public static Class loadClass(URL codeBase, String name)
105        throws MalformedURLException, ClassNotFoundException
106      {
107        RMIClassLoaderSpi spi = getProviderInstance();
108        if (spi == null)
109          spi = getDefaultProviderInstance();
110        return spi.loadClass(codeBase.toString(), name, null);
111      }
112    
113      /**
114     * Gets a classloader for the given codebase and with the current     * Gets a classloader for the given codebase and with the current
115     * context classloader as parent.     * context classloader as parent.
116     *     *

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26