code: public static void checkDelegateType(Decorator<?> decorator) {
  
          Set<Type> types = new HierarchyDiscovery(decorator.getDelegateType()).getTypeClosure();
  
          for (Type decoratedType : decorator.getDecoratedTypes()) {
              if(!types.contains(decoratedType)) {
                  throw BeanLogger.LOG.delegateMustSupportEveryDecoratedType(decoratedType, decorator);
              }
          }
      }
docs: Check whether the delegate type implements or extends all decorated types.
  
  @param decorator
  @throws DefinitionException If the delegate type doesn't implement or extend all decorated types