private void mergeProxiesWithClassHierarchy() {
    for (Map.Entry<HandlerAndTask, Set<ProxyImplContent>> elementSetEntry : implMap.entrySet()) {
      final HandlerAndTask handlerAndTask = elementSetEntry.getKey();

      // 1. merge super tasks, for same handler
      final Set<Element> superTasks = getSuperClasses(handlerAndTask.task);
      for (Element superTask : superTasks) {
        final HandlerAndTask handlerAndSuperTask = new HandlerAndTask(handlerAndTask.handler, superTask);
        if (implMap.containsKey(handlerAndSuperTask)) {
          appendNonExistentCallbacks(handlerAndSuperTask, handlerAndTask);
        }
      }

      // 2. merge super handlers, for same task
      final Set<Element> superHandlers = getSuperClasses(handlerAndTask.handler);
      for (Element superHandler : superHandlers) {
        final HandlerAndTask superHandlerAndTask = new HandlerAndTask(superHandler, handlerAndTask.task);
        if (implMap.containsKey(superHandlerAndTask)) {
          appendNonExistentCallbacks(superHandlerAndTask, handlerAndTask);
        }

        // 3. merge super handlers, for super tasks
        for (Element superTask : superTasks) {
          final HandlerAndTask superHandlerAndSuperTask = new HandlerAndTask(superHandler, superTask);
          if (implMap.containsKey(superHandlerAndSuperTask)) {
            appendNonExistentCallbacks(superHandlerAndSuperTask, handlerAndTask);
          }
        }
      }
    }
  }
private void mergeProxiesWithClassHierarchy ( ) { for ( Map . Entry < HandlerAndTask , Set < ProxyImplContent > > elementSetEntry : implMap . entrySet ( ) ) { final HandlerAndTask handlerAndTask = elementSetEntry . getKey ( ) ; final Set < Element > superTasks = getSuperClasses ( handlerAndTask . task ) ; for ( Element superTask : superTasks ) { final HandlerAndTask handlerAndSuperTask = new HandlerAndTask ( handlerAndTask . handler , superTask ) ; if ( implMap . containsKey ( handlerAndSuperTask ) ) { appendNonExistentCallbacks ( handlerAndSuperTask , handlerAndTask ) ; } } final Set < Element > superHandlers = getSuperClasses ( handlerAndTask . handler ) ; for ( Element superHandler : superHandlers ) { final HandlerAndTask superHandlerAndTask = new HandlerAndTask ( superHandler , handlerAndTask . task ) ; if ( implMap . containsKey ( superHandlerAndTask ) ) { appendNonExistentCallbacks ( superHandlerAndTask , handlerAndTask ) ; } for ( Element superTask : superTasks ) { final HandlerAndTask superHandlerAndSuperTask = new HandlerAndTask ( superHandler , superTask ) ; if ( implMap . containsKey ( superHandlerAndSuperTask ) ) { appendNonExistentCallbacks ( superHandlerAndSuperTask , handlerAndTask ) ; } } } } }
Merges callbacks implementations taking into account the supper types of the handlers and
the tasks.
1. It will look for callbacks of the super classes of the tasks, in the same handler.
2. It will look for callbacks of the super classes of the handler, that use the same task.
3. It will look for callbacks of the super classes of the handler, that use super classes of the task.