Merged gcj-eclipse branch to trunk.
From-SVN: r120621
This commit is contained in:
@@ -523,11 +523,11 @@ removeActionListener(ActionListener l)
|
||||
* ClassClassException is thrown.
|
||||
* @since 1.3
|
||||
*/
|
||||
public EventListener[] getListeners(Class listenerType)
|
||||
public <T extends EventListener> T[] getListeners(Class<T> listenerType)
|
||||
{
|
||||
if (listenerType == ActionListener.class)
|
||||
return getActionListeners();
|
||||
return (EventListener[]) Array.newInstance(listenerType, 0);
|
||||
return (T[]) getActionListeners();
|
||||
return (T[]) Array.newInstance(listenerType, 0);
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user