code: static Class<?>[] getImplementedContracts(Object provider, Class<?>[] restrictedClasses) {
          Class<?> providerClass = provider instanceof Class<?> ? ((Class<?>)provider) : provider.getClass();
  
          Set<Class<?>> interfaces = collectAllInterfaces(providerClass);
  
          List<Class<?>> implementedContracts = interfaces.stream()
              .filter(el -> Arrays.stream(restrictedClasses).noneMatch(el::equals))
              .collect(Collectors.toList());
  
          return implementedContracts.toArray(new Class<?>[]{});
      }
docs: Liberty change end