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);
            }
        }
    }
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 ) ; } } }
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