[cp-patches] [generics] Patch: FYI: genericize java.beans

Tom Tromey tromey at redhat.com
Fri Mar 3 20:51:36 UTC 2006


I'm checking this in on the generics branch.

I've had this patch for a while but forgot to check it in.
This genericizes some things in java.beans.

Tom

2006-03-03  Tom Tromey  <tromey at redhat.com>

	* java/beans/EventSetDescriptor.java (EventSetDescriptor):
	Genericized.
	(getListenerType): Likewise.
	* java/beans/Introspector.java (getBeanInfo): Genericized.
	* java/beans/DefaultPersistenceDelegate.java (initialize):
	Genericized.

Index: DefaultPersistenceDelegate.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/beans/DefaultPersistenceDelegate.java,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 DefaultPersistenceDelegate.java
--- DefaultPersistenceDelegate.java	2 Mar 2006 09:33:56 -0000	1.1.2.2
+++ DefaultPersistenceDelegate.java	3 Mar 2006 20:48:50 -0000
@@ -154,8 +154,8 @@
     return new Expression(oldInstance, oldInstance.getClass(), "new", args);
   }
 
-  protected void initialize(Class type, Object oldInstance, Object newInstance,
-                            Encoder out)
+  protected void initialize(Class<?> type, Object oldInstance,
+                            Object newInstance, Encoder out)
   {
     // Calling the supertype's implementation of initialize makes it
     // possible that descendants of classes like AbstractHashMap
Index: EventSetDescriptor.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/beans/EventSetDescriptor.java,v
retrieving revision 1.6.2.5
diff -u -r1.6.2.5 EventSetDescriptor.java
--- EventSetDescriptor.java	2 Mar 2006 09:33:56 -0000	1.6.2.5
+++ EventSetDescriptor.java	3 Mar 2006 20:48:51 -0000
@@ -164,8 +164,8 @@
    *              if listenerType is not an EventListener, or if methods are not
    *              found or are invalid.
    */
-  public EventSetDescriptor(Class eventSourceClass, String eventSetName,
-                            Class listenerType, String listenerMethodName)
+  public EventSetDescriptor(Class<?> eventSourceClass, String eventSetName,
+                            Class<?> listenerType, String listenerMethodName)
       throws IntrospectionException
   {
     setName(eventSetName);
@@ -225,8 +225,8 @@
    *              if listenerType is not an EventListener or if methods are not
    *              found or are invalid.
    */
-  public EventSetDescriptor(Class eventSourceClass, String eventSetName,
-                            Class listenerType, String[] listenerMethodNames,
+  public EventSetDescriptor(Class<?> eventSourceClass, String eventSetName,
+                            Class<?> listenerType, String[] listenerMethodNames,
                             String addListenerMethodName,
                             String removeListenerMethodName)
       throws IntrospectionException
@@ -287,8 +287,8 @@
    *              found or are invalid.
    * @since 1.4
    */
-  public EventSetDescriptor(Class eventSourceClass, String eventSetName,
-                            Class listenerType, String[] listenerMethodNames,
+  public EventSetDescriptor(Class<?> eventSourceClass, String eventSetName,
+                            Class<?> listenerType, String[] listenerMethodNames,
                             String addListenerMethodName,
                             String removeListenerMethodName,
                             String getListenerMethodName)
@@ -357,7 +357,7 @@
    *              methods are invalid.
    * @since 1.4
    */
-  public EventSetDescriptor(String eventSetName, Class listenerType,
+  public EventSetDescriptor(String eventSetName, Class<?> listenerType,
                             Method[] listenerMethods, Method addListenerMethod,
                             Method removeListenerMethod,
                             Method getListenerMethod)
@@ -402,7 +402,7 @@
    *              if the listenerType is not an EventListener, or any of the
    *              methods are invalid.
    */
-  public EventSetDescriptor(String eventSetName, Class listenerType,
+  public EventSetDescriptor(String eventSetName, Class<?> listenerType,
                             Method[] listenerMethods, Method addListenerMethod,
                             Method removeListenerMethod)
       throws IntrospectionException
@@ -449,7 +449,7 @@
    *              if the listenerType is not an EventListener, or any of the
    *              methods are invalid.
    */
-  public EventSetDescriptor(String eventSetName, Class listenerType,
+  public EventSetDescriptor(String eventSetName, Class<?> listenerType,
                             MethodDescriptor[] listenerMethodDescriptors,
                             Method addListenerMethod,
                             Method removeListenerMethod)
@@ -484,7 +484,7 @@
 
   /** Returns the class that contains the event firing methods.
    */
-  public Class getListenerType()
+  public Class<?> getListenerType()
   {
     return listenerType;
   }
Index: Introspector.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/beans/Introspector.java,v
retrieving revision 1.17.2.5
diff -u -r1.17.2.5 Introspector.java
--- Introspector.java	13 Jan 2006 13:17:14 -0000	1.17.2.5
+++ Introspector.java	3 Mar 2006 20:48:51 -0000
@@ -246,7 +246,7 @@
    * @throws IntrospectionException If something goes wrong while retrieving
    *    the bean data.
    */
-  public static BeanInfo getBeanInfo(Class beanClass, int flag)
+  public static BeanInfo getBeanInfo(Class<?> beanClass, int flag)
     throws IntrospectionException
   {
     IntrospectionIncubator ii;



More information about the Classpath-patches mailing list