docs: protected @Nonnull <T> Collection<BeanDefinition> findBeanCandidatesForInstance(@Nonnull T instance) {
          ArgumentUtils.requireNonNull("instance", instance);
          if (LOG.isDebugEnabled()) {
              LOG.debug("Finding candidate beans for instance: {}", instance);
          }
          Collection<BeanDefinitionReference> beanDefinitionsClasses = this.beanDefinitionsClasses;
          return beanCandidateCache.computeIfAbsent(instance.getClass(), aClass -> {
              // first traverse component definition classes and load candidates
  
              if (!beanDefinitionsClasses.isEmpty()) {
  
                  List<BeanDefinition> candidates = beanDefinitionsClasses
                          .stream()
                          .filter(reference -> {
                              if (reference.isEnabled(this)) {
                                  Class<?> candidateType = reference.getBeanType();
  
                                  return candidateType != null && candidateType.isInstance(instance);
                              } else {
                                  return false;
                              }
                          })
                          .map(ref -> ref.load(this))
                          .filter(candidate -> candidate.isEnabled(this))
                          .collect(Collectors.toList());
  
                  if (candidates.size() > 1) {
                      // try narrow to exact type
                      candidates = candidates
                              .stream()
                              .filter(candidate ->
                                      !(candidate instanceof NoInjectionBeanDefinition) &&
                                              candidate.getBeanType() == instance.getClass()
                              )
                              .collect(Collectors.toList());
                      return candidates;
                  }
                  if (LOG.isDebugEnabled()) {
                      LOG.debug("Resolved bean candidates {} for instance: {}", candidates, instance);
                  }
                  return candidates;
              } else {
                  if (LOG.isDebugEnabled()) {
                      LOG.debug("No bean candidates found for instance: {}", instance);
                  }
                  return Collections.emptySet();
              }
          });
  
      }