This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FakeEventBinderProvider implements FakeProvider<EventBinder<?>> { | |
@Override | |
public EventBinder<?> getFake(Class<?> type) { | |
return (EventBinder<?>) Proxy.newProxyInstance(FakeEventBinderProvider.class.getClassLoader(), new Class<?>[] { type }, new InvocationHandler() { | |
@Override | |
public Object invoke(Object proxy, Method method, final Object[] args) throws Throwable { | |
String methodName = method.getName(); | |
assert methodName.equals("bindEventHandlers"); | |
final List<HandlerRegistration> registrations = new LinkedList<HandlerRegistration>(); |