docs: @Override
    public void checkIllegalBinding(Binding binding, Scope scope) {
      Class<?> clazz;
      switch (binding.getMode()) {
        case SIMPLE:
          clazz = binding.getKey();
          break;
        case CLASS:
          clazz = binding.getImplementationClass();
          break;
        case PROVIDER_CLASS:
          clazz = binding.getProviderClass();
          break;
        default:
          return;
      }
  
      for (Annotation annotation : clazz.getAnnotations()) {
        Class<? extends Annotation> annotationType = annotation.annotationType();
        if (annotationType.isAnnotationPresent(javax.inject.Scope.class)) {
          if (!scope.isBoundToScopeAnnotation(annotationType)) {
            throw new IllegalBindingException(format("Class %s cannot be bound."
                    + " It has a scope annotation: %s that is not supported by current scope: %s",
                clazz.getName(), annotationType.getName(), scope.getName()));
          }
        }
      }
    }