docs: @SuppressWarnings({"WeakerAccess", "SameParameterValue"})
      @Internal
      @UsedByGeneratedCode
      protected final boolean containsProperties(@SuppressWarnings("unused") BeanResolutionContext resolutionContext, BeanContext context, String subProperty) {
          boolean isSubProperty = StringUtils.isNotEmpty(subProperty);
          if (!isSubProperty && !requiredComponents.isEmpty()) {
              // if the bean requires dependency injection we disable this optimization
              return true;
          }
          if (isConfigurationProperties && context instanceof ApplicationContext) {
              AnnotationMetadata annotationMetadata = getAnnotationMetadata();
              ApplicationContext appCtx = (ApplicationContext) context;
              if (annotationMetadata.getValue(ConfigurationProperties.class, "cliPrefix").isPresent()) {
                  return true;
              } else {
                  String path = getConfigurationPropertiesPath(resolutionContext);
                  return appCtx.containsProperties(path);
              }
  
          }
          return false;
      }