/[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 by jfrijters, Sat Jul 10 07:54:29 2004 UTC revision 1.13.2.1 by tromey, Sun Oct 10 00:04:38 2004 UTC
# Line 1  Line 1 
1  /* Proxy.java -- build a proxy class that implements reflected interfaces  /* Proxy.java -- build a proxy class that implements reflected interfaces
2     Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.     Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 155  import gnu.java.lang.reflect.TypeSignatu Line 155  import gnu.java.lang.reflect.TypeSignatu
155   * @see Class   * @see Class
156   * @author Eric Blake <ebb9@email.byu.edu>   * @author Eric Blake <ebb9@email.byu.edu>
157   * @since 1.3   * @since 1.3
158   * @status updated to 1.4, except for the use of ProtectionDomain   * @status updated to 1.5, except for the use of ProtectionDomain
159   */   */
160  public class Proxy implements Serializable  public class Proxy implements Serializable
161  {  {
# Line 254  public class Proxy implements Serializab Line 254  public class Proxy implements Serializab
254     */     */
255    // synchronized so that we aren't trying to build the same class    // synchronized so that we aren't trying to build the same class
256    // simultaneously in two threads    // simultaneously in two threads
257    public static synchronized Class getProxyClass(ClassLoader loader,    public static synchronized Class<?> getProxyClass(ClassLoader loader,
258                                                   Class[] interfaces)                                                      Class<?>... interfaces)
259    {    {
260      interfaces = (Class[]) interfaces.clone();      interfaces = (Class[]) interfaces.clone();
261      ProxyType pt = new ProxyType(loader, interfaces);      ProxyType pt = new ProxyType(loader, interfaces);
# Line 309  public class Proxy implements Serializab Line 309  public class Proxy implements Serializab
309     * @see Constructor#newInstance(Object[])     * @see Constructor#newInstance(Object[])
310     */     */
311    public static Object newProxyInstance(ClassLoader loader,    public static Object newProxyInstance(ClassLoader loader,
312                                          Class[] interfaces,                                          Class<?>[] interfaces,
313                                          InvocationHandler handler)                                          InvocationHandler handler)
314    {    {
315      try      try
# Line 357  public class Proxy implements Serializab Line 357  public class Proxy implements Serializab
357     */     */
358    // This is synchronized on the off chance that another thread is    // This is synchronized on the off chance that another thread is
359    // trying to add a class to the map at the same time we read it.    // trying to add a class to the map at the same time we read it.
360    public static synchronized boolean isProxyClass(Class clazz)    public static synchronized boolean isProxyClass(Class<?> clazz)
361    {    {
362      if (! Proxy.class.isAssignableFrom(clazz))      if (! Proxy.class.isAssignableFrom(clazz))
363        return false;        return false;

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.13.2.1

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