diff options
author | Gary Benson <gbenson@redhat.com> | 2002-11-30 04:41:59 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-11-30 04:41:59 +0000 |
commit | 6d6661fe6f09be8d47c5274f4bb6f22f5c063515 (patch) | |
tree | a88731cf23019b4bd5c409a7fd2325f729773b11 /libjava/java/beans/Introspector.java | |
parent | 2402645b4d554a5dc8f61fb88d33d716c7198c61 (diff) | |
download | gcc-6d6661fe6f09be8d47c5274f4bb6f22f5c063515.zip gcc-6d6661fe6f09be8d47c5274f4bb6f22f5c063515.tar.gz gcc-6d6661fe6f09be8d47c5274f4bb6f22f5c063515.tar.bz2 |
For PR libgcj/8759:
2002-11-29 Gary Benson <gbenson@redhat.com>
For PR libgcj/8759:
* java/beans/Introspector.java (flushCaches): New method.
(flushFromCaches): Likewise.
From-SVN: r59650
Diffstat (limited to 'libjava/java/beans/Introspector.java')
-rw-r--r-- | libjava/java/beans/Introspector.java | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/libjava/java/beans/Introspector.java b/libjava/java/beans/Introspector.java index fa98c69..ac9e367 100644 --- a/libjava/java/beans/Introspector.java +++ b/libjava/java/beans/Introspector.java @@ -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 |