equal
deleted
inserted
replaced
174 |
174 |
175 setAddListenerMethod(getMethod(sourceClass, addListenerMethodName, 1)); |
175 setAddListenerMethod(getMethod(sourceClass, addListenerMethodName, 1)); |
176 setRemoveListenerMethod(getMethod(sourceClass, removeListenerMethodName, 1)); |
176 setRemoveListenerMethod(getMethod(sourceClass, removeListenerMethodName, 1)); |
177 |
177 |
178 // Be more forgiving of not finding the getListener method. |
178 // Be more forgiving of not finding the getListener method. |
179 if (getListenerMethodName != null) { |
179 Method method = Introspector.findMethod(sourceClass, getListenerMethodName, 0); |
180 setGetListenerMethod(Introspector.findInstanceMethod(sourceClass, getListenerMethodName)); |
180 if (method != null) { |
|
181 setGetListenerMethod(method); |
181 } |
182 } |
182 } |
183 } |
183 |
184 |
184 private static Method getMethod(Class cls, String name, int args) |
185 private static Method getMethod(Class cls, String name, int args) |
185 throws IntrospectionException { |
186 throws IntrospectionException { |