code: private void collectAPIJars(FeatureInfo featureInfo,
                                  Map<String, FeatureInfo> allowedFeatures,
                                  Set<File> apiJars) {
          for (SubsystemContentType contentType : JAR_CONTENT_TYPES) {
              for (FeatureResource resource : featureInfo.feature.getConstituents(contentType)) {
                  if (APIType.getAPIType(resource) == APIType.API) {
                      File file = featureInfo.productInfo.repository.selectBundle(resource.getLocation(), resource.getSymbolicName(), resource.getVersionRange());
                      if (file != null) {
                          apiJars.add(file);
                      }
                  }
              }
          }
  
          for (FeatureResource resource : featureInfo.feature.getConstituents(SubsystemContentType.FEATURE_TYPE)) {
              String name = resource.getSymbolicName();
              FeatureInfo childFeatureInfo = allowedFeatures.get(name);
              if (childFeatureInfo != null && APIType.API.matches(resource)) {
                  allowedFeatures.remove(name);
                  collectAPIJars(childFeatureInfo, allowedFeatures, apiJars);
              }
          }
      }
docs: Collect API JARs from a feature and its recursive dependencies.
  
  @param featureInfo the feature to process
  @param visitedFeaturesBySymbolicName result set of visited features
  @param apiJars result set of API JAR files
  @param featuresBySymbolicName symbolic name to info