001 package org.hackystat.sensor.ant.task; 002 003 import java.util.ArrayList; 004 import java.util.List; 005 006 import org.apache.tools.ant.types.FileSet; 007 008 /** 009 * Represents the sourcefiles element that can be nested in a Hackystat sensor Ant task. 010 * @author Philip Johnson 011 */ 012 public class SourceFiles { 013 014 /** The list of all FileSets in this element. */ 015 protected List<FileSet> filesets = new ArrayList<FileSet>(); 016 017 /** 018 * The sourcefiles element must contain one or more internal filesets. 019 * This enables Ant to update our internal instance variable. 020 * 021 * @param fs The file set. 022 */ 023 public void addFileSet(FileSet fs) { 024 filesets.add(fs); 025 } 026 027 /** 028 * Returns the list of FileSet instances associated with the sourcefiles element. 029 * @return The list of FileSets. 030 */ 031 public List<FileSet> getFileSets() { 032 return this.filesets; 033 } 034 035 }