code: public static Collection<ModelElementType> calculateAllExtendingTypes(Model model, Collection<ModelElementType> baseTypes) {
      Set<ModelElementType> allExtendingTypes = new HashSet<ModelElementType>();
      for (ModelElementType baseType : baseTypes) {
        ModelElementTypeImpl modelElementTypeImpl = (ModelElementTypeImpl) model.getType(baseType.getInstanceType());
        modelElementTypeImpl.resolveExtendingTypes(allExtendingTypes);
      }
      return allExtendingTypes;
    }
docs: Calculate a collection of all extending types for the given base types
  
  @param baseTypes the collection of types to calculate the union of all extending types