]> source.dussan.org Git - vaadin-framework.git/commitdiff
#5692 Generics: EventRouter, MethodEventSource, AbstractComponent
authorHenri Sara <henri.sara@itmill.com>
Mon, 4 Oct 2010 12:59:49 +0000 (12:59 +0000)
committerHenri Sara <henri.sara@itmill.com>
Mon, 4 Oct 2010 12:59:49 +0000 (12:59 +0000)
svn changeset:15365/svn branch:6.5

src/com/vaadin/event/EventRouter.java
src/com/vaadin/event/MethodEventSource.java
src/com/vaadin/ui/AbstractComponent.java

index dd13445e93235fad2506a58abfc0385ad2288919..69d98db27679d3c00903e2b597e86a6eb7b14071 100644 (file)
@@ -33,7 +33,7 @@ public class EventRouter implements MethodEventSource {
      * events generated by this component. Don't add a JavaDoc comment here, we
      * use the default documentation from implemented interface.
      */
-    public void addListener(Class eventType, Object object, Method method) {
+    public void addListener(Class<?> eventType, Object object, Method method) {
         if (listenerList == null) {
             listenerList = new LinkedHashSet<ListenerMethod>();
         }
@@ -45,7 +45,7 @@ public class EventRouter implements MethodEventSource {
      * listen events generated by this component. Don't add a JavaDoc comment
      * here, we use the default documentation from implemented interface.
      */
-    public void addListener(Class eventType, Object object, String methodName) {
+    public void addListener(Class<?> eventType, Object object, String methodName) {
         if (listenerList == null) {
             listenerList = new LinkedHashSet<ListenerMethod>();
         }
@@ -57,7 +57,7 @@ public class EventRouter implements MethodEventSource {
      * a JavaDoc comment here, we use the default documentation from implemented
      * interface.
      */
-    public void removeListener(Class eventType, Object target) {
+    public void removeListener(Class<?> eventType, Object target) {
         if (listenerList != null) {
             final Iterator<ListenerMethod> i = listenerList.iterator();
             while (i.hasNext()) {
@@ -75,7 +75,7 @@ public class EventRouter implements MethodEventSource {
      * Don't add a JavaDoc comment here, we use the default documentation from
      * implemented interface.
      */
-    public void removeListener(Class eventType, Object target, Method method) {
+    public void removeListener(Class<?> eventType, Object target, Method method) {
         if (listenerList != null) {
             final Iterator<ListenerMethod> i = listenerList.iterator();
             while (i.hasNext()) {
@@ -93,7 +93,8 @@ public class EventRouter implements MethodEventSource {
      * Don't add a JavaDoc comment here, we use the default documentation from
      * implemented interface.
      */
-    public void removeListener(Class eventType, Object target, String methodName) {
+    public void removeListener(Class<?> eventType, Object target,
+            String methodName) {
 
         // Find the correct method
         final Method[] methods = target.getClass().getMethods();
index 680aaad4b839478a568ff658b7bc1e8133059f36..e6c16ab054ff4531e4268f7464c95a3fd0fa92ce 100644 (file)
@@ -48,7 +48,7 @@ public interface MethodEventSource extends Serializable {
      *             unless <code>method</code> has exactly one match in
      *             <code>object</code>
      */
-    public void addListener(Class eventType, Object object, Method method);
+    public void addListener(Class<?> eventType, Object object, Method method);
 
     /**
      * <p>
@@ -81,7 +81,7 @@ public interface MethodEventSource extends Serializable {
      *             unless <code>method</code> has exactly one match in
      *             <code>object</code>
      */
-    public void addListener(Class eventType, Object object, String methodName);
+    public void addListener(Class<?> eventType, Object object, String methodName);
 
     /**
      * Removes all registered listeners matching the given parameters. Since
@@ -101,7 +101,7 @@ public interface MethodEventSource extends Serializable {
      *            the target object that has registered to listen to events of
      *            type <code>eventType</code> with one or more methods.
      */
-    public void removeListener(Class eventType, Object target);
+    public void removeListener(Class<?> eventType, Object target);
 
     /**
      * Removes one registered listener method. The given method owned by the
@@ -122,7 +122,7 @@ public interface MethodEventSource extends Serializable {
      *            the method owned by the target that's registered to listen to
      *            events of type eventType.
      */
-    public void removeListener(Class eventType, Object target, Method method);
+    public void removeListener(Class<?> eventType, Object target, Method method);
 
     /**
      * <p>
@@ -152,5 +152,6 @@ public interface MethodEventSource extends Serializable {
      *            the name of the method owned by <code>target</code> that's
      *            registered to listen to events of type <code>eventType</code>.
      */
-    public void removeListener(Class eventType, Object target, String methodName);
+    public void removeListener(Class<?> eventType, Object target,
+            String methodName);
 }
index 78e73845ad19fbb8d9b737a4620f6f34418d7adc..061323bf22acd711f8b456f5c471eef5f0f18161 100644 (file)
@@ -1000,7 +1000,7 @@ public abstract class AbstractComponent implements Component, MethodEventSource
      * @param method
      *            the activation method.
      */
-    public void addListener(Class eventType, Object target, Method method) {
+    public void addListener(Class<?> eventType, Object target, Method method) {
         if (eventRouter == null) {
             eventRouter = new EventRouter();
         }
@@ -1041,7 +1041,7 @@ public abstract class AbstractComponent implements Component, MethodEventSource
      * @param methodName
      *            the name of the activation method.
      */
-    public void addListener(Class eventType, Object target, String methodName) {
+    public void addListener(Class<?> eventType, Object target, String methodName) {
         if (eventRouter == null) {
             eventRouter = new EventRouter();
         }
@@ -1066,7 +1066,7 @@ public abstract class AbstractComponent implements Component, MethodEventSource
      *            the target object that has registered to listen to events of
      *            type <code>eventType</code> with one or more methods.
      */
-    public void removeListener(Class eventType, Object target) {
+    public void removeListener(Class<?> eventType, Object target) {
         if (eventRouter != null) {
             eventRouter.removeListener(eventType, target);
         }
@@ -1091,7 +1091,7 @@ public abstract class AbstractComponent implements Component, MethodEventSource
      *            the method owned by <code>target</code> that's registered to
      *            listen to events of type <code>eventType</code>.
      */
-    public void removeListener(Class eventType, Object target, Method method) {
+    public void removeListener(Class<?> eventType, Object target, Method method) {
         if (eventRouter != null) {
             eventRouter.removeListener(eventType, target, method);
         }
@@ -1125,7 +1125,8 @@ public abstract class AbstractComponent implements Component, MethodEventSource
      *            the name of the method owned by <code>target</code> that's
      *            registered to listen to events of type <code>eventType</code>.
      */
-    public void removeListener(Class eventType, Object target, String methodName) {
+    public void removeListener(Class<?> eventType, Object target,
+            String methodName) {
         if (eventRouter != null) {
             eventRouter.removeListener(eventType, target, methodName);
         }