For PR libgcj/8759:
authorGary Benson <gbenson@redhat.com>
Sat, 30 Nov 2002 04:41:59 +0000 (04:41 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Sat, 30 Nov 2002 04:41:59 +0000 (04:41 +0000)
2002-11-29  Gary Benson  <gbenson@redhat.com>

For PR libgcj/8759:
* java/beans/Introspector.java (flushCaches): New method.
(flushFromCaches): Likewise.

From-SVN: r59650

libjava/ChangeLog
libjava/java/beans/Introspector.java

index b88803fd90791e5a9d07fc4762fea43ff622e4c1..9206f99b796d9e2980dfa472b42cfb386f1af035 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-29  Gary Benson  <gbenson@redhat.com>
+
+       For PR libgcj/8759:
+       * java/beans/Introspector.java (flushCaches): New method.
+       (flushFromCaches): Likewise.
+
 2002-11-29  Michael Koch <konqueror@gmx.de>
 
        * java/nio/channels/DatagramChannel.java
index fa98c69ae9d5bcd399a52ea356340b8595420953..ac9e36721e4a00c95d9c828052392a764489f3b4 100644 (file)
@@ -1,5 +1,5 @@
 /* java.beans.Introspector
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 2002 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -209,6 +209,32 @@ public class Introspector {
       }
   }
 
+  /**
+   * Flush all of the Introspector's internal caches.
+   *
+   * @since 1.2
+   */
+  public static void flushCaches()
+  {
+    beanInfoCache.clear();
+  }
+
+  /**
+   * Flush the Introspector's internal cached information for a given
+   * class.
+   *
+   * @param clz the class to be flushed.
+   * @throws NullPointerException if clz is null.
+   * @since 1.2
+   */
+  public static void flushFromCaches(Class clz)
+  {
+    synchronized (clz)
+      {
+       beanInfoCache.remove(clz);
+      }
+  }
+
   /** 
    * Get the BeanInfo for class <CODE>beanClass</CODE>,
    * first by looking for explicit information, next by