jdk/src/share/classes/java/beans/EventSetDescriptor.java
changeset 11120 f8576c769572
parent 6657 15dbb366c6a3
child 14887 226dd1cda199
equal deleted inserted replaced
11119:6ff03c1202ce 11120:f8576c769572
    43     private MethodDescriptor addMethodDescriptor;
    43     private MethodDescriptor addMethodDescriptor;
    44     private MethodDescriptor removeMethodDescriptor;
    44     private MethodDescriptor removeMethodDescriptor;
    45     private MethodDescriptor getMethodDescriptor;
    45     private MethodDescriptor getMethodDescriptor;
    46 
    46 
    47     private Reference<Method[]> listenerMethodsRef;
    47     private Reference<Method[]> listenerMethodsRef;
    48     private Reference<Class> listenerTypeRef;
    48     private Reference<? extends Class<?>> listenerTypeRef;
    49 
    49 
    50     private boolean unicast;
    50     private boolean unicast;
    51     private boolean inDefaultEventSet = true;
    51     private boolean inDefaultEventSet = true;
    52 
    52 
    53     /**
    53     /**
    89                                                  eventName + "\"");
    89                                                  eventName + "\"");
    90             }
    90             }
    91         }
    91         }
    92     }
    92     }
    93 
    93 
    94     private static String getListenerClassName(Class cls) {
    94     private static String getListenerClassName(Class<?> cls) {
    95         String className = cls.getName();
    95         String className = cls.getName();
    96         return className.substring(className.lastIndexOf('.') + 1);
    96         return className.substring(className.lastIndexOf('.') + 1);
    97     }
    97     }
    98 
    98 
    99     /**
    99     /**
   180         if (method != null) {
   180         if (method != null) {
   181             setGetListenerMethod(method);
   181             setGetListenerMethod(method);
   182         }
   182         }
   183     }
   183     }
   184 
   184 
   185     private static Method getMethod(Class cls, String name, int args)
   185     private static Method getMethod(Class<?> cls, String name, int args)
   186         throws IntrospectionException {
   186         throws IntrospectionException {
   187         if (name == null) {
   187         if (name == null) {
   188             return null;
   188             return null;
   189         }
   189         }
   190         Method method = Introspector.findMethod(cls, name, args);
   190         Method method = Introspector.findMethod(cls, name, args);
   293         return (this.listenerTypeRef != null)
   293         return (this.listenerTypeRef != null)
   294                 ? this.listenerTypeRef.get()
   294                 ? this.listenerTypeRef.get()
   295                 : null;
   295                 : null;
   296     }
   296     }
   297 
   297 
   298     private void setListenerType(Class cls) {
   298     private void setListenerType(Class<?> cls) {
   299         this.listenerTypeRef = getWeakReference(cls);
   299         this.listenerTypeRef = getWeakReference(cls);
   300     }
   300     }
   301 
   301 
   302     /**
   302     /**
   303      * Gets the methods of the target listener interface.
   303      * Gets the methods of the target listener interface.