Package com.google.web.bindery.event.shared.binder

Examples of com.google.web.bindery.event.shared.binder.EventHandler


  void writeDoBindEventHandlers(JClassType target, SourceWriter writer, TypeOracle typeOracle)
      throws UnableToCompleteException {
    writeBindMethodHeader(writer, target.getQualifiedSourceName());
    for (JMethod method : target.getInheritableMethods()) {
      EventHandler annotation = method.getAnnotation(EventHandler.class);
      if (annotation != null) {
        writeHandlerForBindMethod(annotation, writer, method, typeOracle);
      }
    }
    writeBindMethodFooter(writer);
View Full Code Here


    return newMethod(name, params, new Class[0]);
  }

  @SuppressWarnings("unchecked")
  private JMethod newMethod(String name, JType[] params, Class[] events) {
    EventHandler eventHandler = mock(EventHandler.class);
    when(eventHandler.handles()).thenReturn(events);

    JMethod method = mock(JMethod.class);
    when(method.getAnnotation(EventHandler.class)).thenReturn(eventHandler);
    when(method.getName()).thenReturn(name);
    when(method.getParameterTypes()).thenReturn(params);
View Full Code Here

TOP

Related Classes of com.google.web.bindery.event.shared.binder.EventHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.