code: private void putRecursive(Class<?> type, E element, Class<?> elementType) {
  
      Class<?> clazz = type;
      while (clazz != null) {
        if (isAccepted(clazz)) {
          E existing = this.classMap.get(clazz);
          boolean add = (existing == null);
          if (existing != null) {
            if (existing == element) {
              return;
            }
            add = isPreferable(element, elementType, existing, clazz);
          }
          if (add) {
            this.classMap.put(clazz, element);
          }
        }
        for (Class<?> interfaceClass : clazz.getInterfaces()) {
          if (isAccepted(interfaceClass)) {
            putRecursive(interfaceClass, element, elementType);
          }
        }
        clazz = clazz.getSuperclass();
      }
    }
docs: This method performs the {@link #put(Class, Object) put} recursively.
  
  @param type is the current {@link Class} used as key to associate the given {@code element}.
  @param element is the element to put.
  @param elementType is the the {@code type} of the original {@link #put(Class, Object) put}.