// Path: parent/bundles/com.google.eclipse.mechanic/src/com/google/eclipse/mechanic/ICollector.java
// public interface ICollector<T> {
//   /**
//    * Add a element to the collector.
//    */
//   void collect(T element);
// }
// 
// Path: parent/bundles/com.google.eclipse.mechanic/src/com/google/eclipse/mechanic/IResourceTaskProvider.java
// public interface IResourceTaskProvider {
//   /**
//    * Collect task references provided by this provider.
//    *
//    * <p>In theory this is similar to calling
//    * {@code collectTaskReferences(".", extFilter, collector)}, but
//    * that's in theory only.
//    *
//    * @param extFilter the filename extension to filter.
//    * @param collector the collector to receive all task references.
//    *
//    * TODO(konigsberg): Remove the filter parameter.
//    */
//   void collectTaskReferences(
//       String extFilter,
//       ICollector<IResourceTaskReference> collector);
// 
//   /**
//    * Collect task references provided by this provider, relative to the
//    * provider's root.
//    *
//    * <p>This is only used for finding Class-based tasks, and is not even
//    * implemented in the UriTaskProvider.
//    *
//    * @param localPath the relative path to the resources
//    * @param extFilter the filename extension to filter.
//    * @param collector the collector to receive all task references.
//    *
//    * TODO(konigsberg): Remove the filter parameter.
//    */
//   void collectTaskReferences(
//       String localPath,
//       String extFilter,
//       ICollector<IResourceTaskReference> collector);
// }
// 
// Path: parent/bundles/com.google.eclipse.mechanic/src/com/google/eclipse/mechanic/IResourceTaskReference.java
// public interface IResourceTaskReference {
//   /** Return the name of the task reference. This is typically a local name. */
//   String getName();
// 
//   /** Return the task reference as an input stream. */
//   InputStream newInputStream() throws IOException;
// 
//   /**
//    * Return the time this resource was last modified, in milliseconds since the epoch.
//    */
//   long getLastModified() throws IOException;
// 
//   /** 
//    * Return the task reference path. Provide enough metadata to give it some distinction,
//    * separate from other providers.
//    */
//   String getPath();
// 
//   /**
//    * Return the File representation of this resource. Is {@code null} it's not a File.
//    */
//   File asFile();
// 
//   /**
//    * Return the MD5 hash of this task
//    */
//   long computeMD5() throws IOException;
// }


import java.util.Collection;
import java.util.List;
import com.google.common.collect.ImmutableList;
import com.google.eclipse.mechanic.ICollector;
import com.google.eclipse.mechanic.IResourceTaskProvider;
import com.google.eclipse.mechanic.IResourceTaskReference;
package com.google.eclipse.mechanic.internal;



/**
 * Collects from multiple task providers in one go.
 */
public class CompositeResourceTaskProvider implements IResourceTaskProvider {

  private final List<IResourceTaskProvider> providers;

  public CompositeResourceTaskProvider(Collection<IResourceTaskProvider> providers) {
    this.providers = ImmutableList.copyOf(providers);
  }

  public void collectTaskReferences(String extFilter,
// Path: parent/bundles/com.google.eclipse.mechanic/src/com/google/eclipse/mechanic/ICollector.java
// public interface ICollector<T> {
//   /**
//    * Add a element to the collector.
//    */
//   void collect(T element);
// }
// 
// Path: parent/bundles/com.google.eclipse.mechanic/src/com/google/eclipse/mechanic/IResourceTaskProvider.java
// public interface IResourceTaskProvider {
//   /**
//    * Collect task references provided by this provider.
//    *
//    * <p>In theory this is similar to calling
//    * {@code collectTaskReferences(".", extFilter, collector)}, but
//    * that's in theory only.
//    *
//    * @param extFilter the filename extension to filter.
//    * @param collector the collector to receive all task references.
//    *
//    * TODO(konigsberg): Remove the filter parameter.
//    */
//   void collectTaskReferences(
//       String extFilter,
//       ICollector<IResourceTaskReference> collector);
// 
//   /**
//    * Collect task references provided by this provider, relative to the
//    * provider's root.
//    *
//    * <p>This is only used for finding Class-based tasks, and is not even
//    * implemented in the UriTaskProvider.
//    *
//    * @param localPath the relative path to the resources
//    * @param extFilter the filename extension to filter.
//    * @param collector the collector to receive all task references.
//    *
//    * TODO(konigsberg): Remove the filter parameter.
//    */
//   void collectTaskReferences(
//       String localPath,
//       String extFilter,
//       ICollector<IResourceTaskReference> collector);
// }
// 
// Path: parent/bundles/com.google.eclipse.mechanic/src/com/google/eclipse/mechanic/IResourceTaskReference.java
// public interface IResourceTaskReference {
//   /** Return the name of the task reference. This is typically a local name. */
//   String getName();
// 
//   /** Return the task reference as an input stream. */
//   InputStream newInputStream() throws IOException;
// 
//   /**
//    * Return the time this resource was last modified, in milliseconds since the epoch.
//    */
//   long getLastModified() throws IOException;
// 
//   /** 
//    * Return the task reference path. Provide enough metadata to give it some distinction,
//    * separate from other providers.
//    */
//   String getPath();
// 
//   /**
//    * Return the File representation of this resource. Is {@code null} it's not a File.
//    */
//   File asFile();
// 
//   /**
//    * Return the MD5 hash of this task
//    */
//   long computeMD5() throws IOException;
// }


// Path: parent/bundles/com.google.eclipse.mechanic/src/com/google/eclipse/mechanic/internal/CompositeResourceTaskProvider.java
import java.util.Collection;
import java.util.List;
import com.google.common.collect.ImmutableList;
import com.google.eclipse.mechanic.ICollector;
import com.google.eclipse.mechanic.IResourceTaskProvider;
import com.google.eclipse.mechanic.IResourceTaskReference;

package com.google.eclipse.mechanic.internal;



/**
 * Collects from multiple task providers in one go.
 */
public class CompositeResourceTaskProvider implements IResourceTaskProvider {

  private final List<IResourceTaskProvider> providers;

  public CompositeResourceTaskProvider(Collection<IResourceTaskProvider> providers) {
    this.providers = ImmutableList.copyOf(providers);
  }

  public void collectTaskReferences(String extFilter,
      ICollector<IResourceTaskReference> collector) {