/[classpath]/classpath/java/lang/reflect/Proxy.java
ViewVC logotype

Diff of /classpath/java/lang/reflect/Proxy.java

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

revision 1.13.2.7 by gnu_andrew, Tue Sep 20 18:46:29 2005 UTC revision 1.13.2.8 by gnu_andrew, Wed Nov 2 00:43:34 2005 UTC
# Line 111  import java.util.Set; Line 111  import java.util.Set;
111   *      the only way to create an instance of the proxy class.</li>   *      the only way to create an instance of the proxy class.</li>
112   *  <li>The proxy class contains a single constructor, which takes as   *  <li>The proxy class contains a single constructor, which takes as
113   *      its only argument an {@link InvocationHandler}.  The method   *      its only argument an {@link InvocationHandler}.  The method
114   *      {@link #newInstance} is shorthand to do the necessary   *      {@link #newProxyInstance(ClassLoader, Class[], InvocationHandler)}
115   *      reflection.</li>   *      is shorthand to do the necessary reflection.</li>
116   * </ul>   * </ul>
117   *   *
118   * <h3>Proxy Instances</h3>   * <h3>Proxy Instances</h3>
# Line 413  public class Proxy implements Serializab Line 413  public class Proxy implements Serializab
413       */       */
414      ProxyType(ClassLoader loader, Class[] interfaces)      ProxyType(ClassLoader loader, Class[] interfaces)
415      {      {
       if (loader == null)  
          loader = ClassLoader.getSystemClassLoader();  
416        this.loader = loader;        this.loader = loader;
417        this.interfaces = interfaces;        this.interfaces = interfaces;
418      }      }
# Line 426  public class Proxy implements Serializab Line 424  public class Proxy implements Serializab
424       */       */
425      public int hashCode()      public int hashCode()
426      {      {
427        //loader is always not null        int hash = loader == null ? 0 : loader.hashCode();
       int hash = loader.hashCode();  
428        for (int i = 0; i < interfaces.length; i++)        for (int i = 0; i < interfaces.length; i++)
429          hash = hash * 31 + interfaces[i].hashCode();          hash = hash * 31 + interfaces[i].hashCode();
430        return hash;        return hash;

Legend:
Removed from v.1.13.2.7  
changed lines
  Added in v.1.13.2.8

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