Package com.github.wolfie.blackboard.annotation

Examples of com.github.wolfie.blackboard.annotation.ListenerMethod


        return;
      }
    }

    for (final Method method : listener.getMethods()) {
      final ListenerMethod annotation = method
          .getAnnotation(ListenerMethod.class);
      if (annotation != null) {
        final Class<?>[] params = method.getParameterTypes();
        if (params.length != 1 || !Event.class.isAssignableFrom(params[0])) {
          throw new InvalidListenerMethodConstruction(listener,
View Full Code Here


  private boolean findAndRegisterByAnnotationAndParameterType(
      final Class<? extends Listener> listenerClass) {

    boolean success = false;
    for (final Method method : listenerClass.getMethods()) {
      final ListenerMethod annotation = method
          .getAnnotation(ListenerMethod.class);
      if (annotation != null) {
        _register(listenerClass, getEventType(method, listenerClass));
        success = true;
      }
View Full Code Here

        final Class<? extends Event> event) {

      Method listenerMethod = null;

      for (final Method candidateMethod : listener.getMethods()) {
        final ListenerMethod annotation = candidateMethod
            .getAnnotation(ListenerMethod.class);

        if (annotation != null && hasSuitableParameter(candidateMethod, event)) {
          if (listenerMethod == null) {
            listenerMethod = candidateMethod;
View Full Code Here

TOP

Related Classes of com.github.wolfie.blackboard.annotation.ListenerMethod

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.