/[classpath]/classpath/java/lang/ClassLoader.java
ViewVC logotype

Diff of /classpath/java/lang/ClassLoader.java

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

revision 1.17 by ericb, Thu Mar 28 21:56:55 2002 UTC revision 1.18 by mark, Sat Oct 26 18:41:59 2002 UTC
# Line 61  import gnu.java.util.EmptyEnumeration; Line 61  import gnu.java.util.EmptyEnumeration;
61   * matter, a custom ClassLoader can perform on-the-fly code generation or   * matter, a custom ClassLoader can perform on-the-fly code generation or
62   * modification!   * modification!
63   *   *
  * XXX - Not all support has been written for the new 1.2 methods yet!  
  *  
64   * <p>Every classloader has a parent classloader that is consulted before   * <p>Every classloader has a parent classloader that is consulted before
65   * the 'child' classloader when classes or resources should be loaded.   * the 'child' classloader when classes or resources should be loaded.
66   * This is done to make sure that classes can be loaded from an hierarchy of   * This is done to make sure that classes can be loaded from an hierarchy of
# Line 210  public abstract class ClassLoader Line 208  public abstract class ClassLoader
208     */     */
209    protected ClassLoader() throws SecurityException    protected ClassLoader() throws SecurityException
210    {    {
211      this(getSystemClassLoader());      this(systemClassLoader);
212    }    }
213    
214    /**    /**
# Line 258  public abstract class ClassLoader Line 256  public abstract class ClassLoader
256     * out if the class has already been loaded through this classloader by     * out if the class has already been loaded through this classloader by
257     * calling <code>findLoadedClass()</code>. Then it calls     * calling <code>findLoadedClass()</code>. Then it calls
258     * <code>loadClass()</code> on the parent classloader (or when there is     * <code>loadClass()</code> on the parent classloader (or when there is
259     * no parent on the bootstrap classloader). When the parent could not load     * no parent it uses the VM bootclassloader)</code>). If the class is still
260     * the class it tries to create a new class by calling     * not loaded it tries to create a new class by calling
261     * <code>findClass()</code>. Finally when <code>resolve</code> is     * <code>findClass()</code>. Finally when <code>resolve</code> is
262     * <code>true</code> it also calls <code>resolveClass()</code> on the     * <code>true</code> it also calls <code>resolveClass()</code> on the
263     * newly loaded class.     * newly loaded class.
# Line 397  public abstract class ClassLoader Line 395  public abstract class ClassLoader
395     * in that package must have the same set of certificates or a     * in that package must have the same set of certificates or a
396     * SecurityException is thrown.     * SecurityException is thrown.
397     *     *
    * XXX - protection domain is not implemented yet; it needs native support.  
    *  
398     * @param name the name to give the class.  null if unknown     * @param name the name to give the class.  null if unknown
399     * @param data the data representing the classfile, in classfile format     * @param data the data representing the classfile, in classfile format
400     * @param offset the offset into the data where the classfile starts     * @param offset the offset into the data where the classfile starts
# Line 450  public abstract class ClassLoader Line 446  public abstract class ClassLoader
446    protected final Class findSystemClass(String name)    protected final Class findSystemClass(String name)
447      throws ClassNotFoundException      throws ClassNotFoundException
448    {    {
449      return Class.forName(name, false, getSystemClassLoader());      return Class.forName(name, false, systemClassLoader);
450    }    }
451    
452    /**    /**
# Line 611  public abstract class ClassLoader Line 607  public abstract class ClassLoader
607     */     */
608    public static final URL getSystemResource(String name)    public static final URL getSystemResource(String name)
609    {    {
610      return getSystemClassLoader().getResource(name);      return systemClassLoader.getResource(name);
611    }    }
612    
613    /**    /**
# Line 627  public abstract class ClassLoader Line 623  public abstract class ClassLoader
623     */     */
624    public static Enumeration getSystemResources(String name) throws IOException    public static Enumeration getSystemResources(String name) throws IOException
625    {    {
626      return getSystemClassLoader().getResources(name);      return systemClassLoader.getResources(name);
627    }    }
628    
629    /**    /**

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

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