docs: @SuppressWarnings("unchecked")
      private boolean shouldAddDefaultValidator(FaceletContext ctx, FaceletCompositionContext mctx,
                                                EditableValueHolder component, 
                                                String validatorId)
      {
          // check if the validatorId is on the exclusion list on the component
          List<String> exclusionList 
                  = (List<String>) ((UIComponent) component).getAttributes()
                          .get(ValidatorTagHandlerDelegate.VALIDATOR_ID_EXCLUSION_LIST_KEY);
          if (exclusionList != null)
          {
              for (String excludedId : exclusionList)
              {
                  if (excludedId.equals(validatorId))
                  {
                      return false;
                  }
              }
          }
          
          // check if the validatorId is on the exclusion list on the stack
          /*
          Iterator<String> it = mctx.getExcludedValidatorIds();
          if (it != null)
          {            
              while (it.hasNext())
              {
                  String excludedId = it.next();
                  if (excludedId.equals(validatorId))
                  {
                      return false;
                  }
              }
          }*/
          Iterator<Map.Entry<String, EditableValueHolderAttachedObjectHandler>> enclosingValidatorIds =
              mctx.getEnclosingValidatorIdsAndHandlers();
          if (enclosingValidatorIds != null)
          {
              while (enclosingValidatorIds.hasNext())
              {
                  Map.Entry<String, EditableValueHolderAttachedObjectHandler> entry = enclosingValidatorIds.next();
                  boolean validatorIdAvailable = entry.getKey() != null && !"".equals(entry.getKey());
                  if (validatorIdAvailable && entry.getKey().equals(validatorId))
                  {
                      if (((ValidatorHandler)((FacesWrapper<ValidatorHandler>)entry.getValue()).getWrapped())
                              .isDisabled(ctx))
                      {
                          return false;
                      }
                  }
              }
          }
          
          // Some extra rules are required for Bean Validation.
          if (validatorId.equals(BeanValidator.VALIDATOR_ID))
          {
              if (!ExternalSpecifications.isBeanValidationAvailable())
              {
                  // the BeanValidator was added as a default-validator, but
                  // bean validation is not available on the classpath.
                  // --> log a warning about this scenario.
                  log.log(Level.WARNING, "Bean validation is not available on the " +
                          "classpath, thus the BeanValidator will not be added for " +
                          "the component " + component);
                  return false;
              }
          }
  
          // By default, all default validators should be added
          return true;
      }