package jetbrains.mps.build.ant;

/*Generated by MPS */

import jetbrains.mps.annotations.GeneratedClass;
import org.apache.tools.ant.types.DataType;
import java.util.List;
import org.apache.tools.ant.types.FileSet;
import java.util.ArrayList;
import java.io.File;
import java.util.Iterator;
import org.apache.tools.ant.types.resources.FileResource;
import java.util.Collections;

@GeneratedClass(node = "r:7b2ffdb7-2bfc-4488-8c0c-ee8fe93fe3c1(jetbrains.mps.build.ant)/3449270742160220910", model = "r:7b2ffdb7-2bfc-4488-8c0c-ee8fe93fe3c1(jetbrains.mps.build.ant)")
public class ExcludeNested extends DataType {
  private List<FileSet> excluded = new ArrayList<FileSet>();
  public ExcludeNested() {
  }
  public List<File> getExcludedFromDiffFiles() {
    List<File> result = new ArrayList<File>();
    for (FileSet inner : excluded) {
      Iterator it = inner.iterator();
      while (it.hasNext()) {
        FileResource next = (FileResource) it.next();
        File file = next.getFile();
        if (file.exists()) {
          result.add(file);
        }
      }
    }
    return Collections.unmodifiableList(result);
  }
  public void addFile(FileSet inner) {
    excluded.add(inner);
  }
  public void addFiles(FileSet inner) {
    excluded.add(inner);
  }
}
