docs: List<JcrPropertyDefinition> findPropertyDefinitions( List<Name> typeNamesToCheck,
                                                           Name propertyName,
                                                           PropertyCardinality typeToCheck,
                                                           List<JcrNodeType> pendingTypes ) {
          assert typeNamesToCheck != null;
  
          Collection<JcrPropertyDefinition> propDefs = null;
          List<JcrPropertyDefinition> matchingDefs = new ArrayList<JcrPropertyDefinition>();
  
          // Look for a single-value property definition on the mixin types that matches by name and type ...
          for (Name typeNameToCheck : typeNamesToCheck) {
              JcrNodeType typeName = findTypeInMapOrList(typeNameToCheck, pendingTypes);
              if (typeName == null) continue;
  
              switch (typeToCheck) {
                  case SINGLE_VALUED_ONLY:
                      propDefs = typeName.allSingleValuePropertyDefinitions(propertyName);
                      break;
                  case MULTI_VALUED_ONLY:
                      propDefs = typeName.allMultiValuePropertyDefinitions(propertyName);
                      break;
                  case ANY:
                      propDefs = typeName.allPropertyDefinitions(propertyName);
                      break;
                  default:
                      throw new IllegalStateException("Should be unreachable: " + typeToCheck);
              }
  
              if (!propDefs.isEmpty()) matchingDefs.addAll(propDefs);
          }
  
          return matchingDefs;
      }