public static < L > void bindEventsToMethod ( final Object target , final String methodName , final Object eventSource , final Class < L > listenerType , final String ... eventTypes ) { final L listener = listenerType . cast ( Proxy . newProxyInstance ( target . getClass ( ) . getClassLoader ( ) , new Class [ ] { listenerType } , new EventBindingInvocationHandler ( target , methodName , eventTypes ) ) ) ; addEventListener ( eventSource , listenerType , listener ) ; }
Binds an event listener to a specific method on a specific object .