diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java index 36e8e023b..cf2334c38 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java @@ -52,18 +52,6 @@ public abstract class MatchingTask m_fileset.setExcludes( excludes ); } - /** - * Sets the name of the file containing the includes patterns. - * - * @param excludesfile A string containing the filename to fetch the include - * patterns from. - */ - public void setExcludesfile( final File excludesfile ) - throws TaskException - { - m_fileset.setExcludesfile( excludesfile ); - } - /** * Sets the set of include patterns. Patterns may be separated by a comma or * a space. @@ -76,60 +64,21 @@ public abstract class MatchingTask m_fileset.setIncludes( includes ); } - /** - * Sets the name of the file containing the includes patterns. - * - * @param includesfile A string containing the filename to fetch the include - * patterns from. - */ - public void setIncludesfile( final File includesfile ) - throws TaskException - { - m_fileset.setIncludesfile( includesfile ); - } - /** * add a name entry on the exclude list - * - * @return Description of the Returned Value */ - public Pattern createExclude() - throws TaskException + public void addExclude( final Pattern pattern ) { - return m_fileset.createExclude(); - } - - /** - * add a name entry on the include files list - * - * @return Description of the Returned Value - */ - public Pattern createExcludesFile() - throws TaskException - { - return m_fileset.createExcludesFile(); + m_fileset.addExclude( pattern ); } /** * add a name entry on the include list - * - * @return Description of the Returned Value - */ - public Pattern createInclude() - throws TaskException - { - return m_fileset.createInclude(); - } - - /** - * add a name entry on the include files list - * - * @return Description of the Returned Value */ - public Pattern createIncludesFile() + public void addInclude( final Pattern pattern ) throws TaskException { - return m_fileset.createIncludesFile(); + m_fileset.addInclude( pattern ); } /** diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java index 500a2130e..2c7da53d6 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java @@ -16,6 +16,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.StringTokenizer; import org.apache.myrmidon.api.TaskException; +import org.apache.myrmidon.framework.Pattern; import org.apache.aut.nativelib.Os; import org.apache.aut.nativelib.ExecOutputHandler; import org.apache.tools.ant.types.DirectoryScanner; @@ -951,7 +952,7 @@ public class Javadoc pkg += "*"; } - fs.createInclude().setName( pkg ); + fs.addInclude( new Pattern( pkg ) ); }// while e = excludePackages.iterator(); @@ -964,7 +965,8 @@ public class Javadoc pkg += "*"; } - fs.createExclude().setName( pkg ); + final Pattern pattern = new Pattern( pkg ); + fs.addExclude( pattern ); } PrintWriter packageListWriter = null; diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java index bdd6626ed..0d0f61db2 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java @@ -144,19 +144,17 @@ public class VAJExport extends VAJTask * * @return Description of the Returned Value */ - public Pattern createExclude() + public void addExclude( final Pattern pattern ) { - return patternSet.createExclude(); + patternSet.addExclude( pattern ); } /** * add a name entry on the include list - * - * @return Description of the Returned Value */ - public Pattern createInclude() + public void addInclude( final Pattern pattern ) { - return patternSet.createInclude(); + patternSet.addInclude( pattern ); } /** diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Chmod.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Chmod.java index af88ac7c7..c570f7fad 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Chmod.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Chmod.java @@ -83,10 +83,10 @@ public class Chmod public void setFile( File src ) throws TaskException { - FileSet fs = new FileSet(); - fs.setDir( new File( src.getParent() ) ); - fs.createInclude().setName( src.getName() ); - addFileset( fs ); + final FileSet fileSet = new FileSet(); + fileSet.setDir( new File( src.getParent() ) ); + fileSet.addInclude( new Pattern( src.getName() ) ); + addFileset( fileSet ); } /** @@ -116,32 +116,26 @@ public class Chmod /** * add a name entry on the exclude list - * - * @return Description of the Returned Value */ - public Pattern createExclude() - throws TaskException + public void addExclude( final Pattern pattern ) { m_defaultSetDefined = true; - return m_defaultSet.createExclude(); + m_defaultSet.addExclude( pattern ); } /** * add a name entry on the include list - * - * @return Description of the Returned Value */ - public Pattern createInclude() + public void addInclude( final Pattern pattern ) throws TaskException { m_defaultSetDefined = true; - return m_defaultSet.createInclude(); + m_defaultSet.addInclude( pattern ); } /** * add a set of patterns * - * @return Description of the Returned Value */ public PatternSet createPatternSet() throws TaskException diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/types/FileSet.java b/proposal/myrmidon/src/main/org/apache/tools/ant/types/FileSet.java index cb4a5211c..096beeb8d 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/types/FileSet.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/types/FileSet.java @@ -68,16 +68,6 @@ public class FileSet m_defaultPatterns.setExcludes( excludes ); } - /** - * Sets the name of the file containing the includes patterns. - * - * @param excl The file to fetch the exclude patterns from. - */ - public void setExcludesfile( final File excludesfile ) - { - m_defaultPatterns.setExcludesfile( excludesfile ); - } - /** * Sets the set of include patterns. Patterns may be separated by a comma or * a space. @@ -89,16 +79,6 @@ public class FileSet m_defaultPatterns.setIncludes( includes ); } - /** - * Sets the name of the file containing the includes patterns. - * - * @param incl The file to fetch the include patterns from. - */ - public void setIncludesfile( final File includesfile ) - { - m_defaultPatterns.setIncludesfile( includesfile ); - } - public void setupDirectoryScanner( final FileScanner ds ) throws TaskException { @@ -164,33 +144,17 @@ public class FileSet /** * add a name entry on the exclude list */ - public Pattern createExclude() - { - return m_defaultPatterns.createExclude(); - } - - /** - * add a name entry on the include files list - */ - public Pattern createExcludesFile() + public void addExclude( final Pattern pattern ) { - return m_defaultPatterns.createExcludesFile(); + m_defaultPatterns.addExclude( pattern ); } /** * add a name entry on the include list */ - public Pattern createInclude() - { - return m_defaultPatterns.createInclude(); - } - - /** - * add a name entry on the include files list - */ - public Pattern createIncludesFile() + public void addInclude( final Pattern pattern ) { - return m_defaultPatterns.createIncludesFile(); + m_defaultPatterns.addInclude( pattern ); } public PatternSet createPatternSet() diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/MatchingTask.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/MatchingTask.java index 36e8e023b..cf2334c38 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/MatchingTask.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/MatchingTask.java @@ -52,18 +52,6 @@ public abstract class MatchingTask m_fileset.setExcludes( excludes ); } - /** - * Sets the name of the file containing the includes patterns. - * - * @param excludesfile A string containing the filename to fetch the include - * patterns from. - */ - public void setExcludesfile( final File excludesfile ) - throws TaskException - { - m_fileset.setExcludesfile( excludesfile ); - } - /** * Sets the set of include patterns. Patterns may be separated by a comma or * a space. @@ -76,60 +64,21 @@ public abstract class MatchingTask m_fileset.setIncludes( includes ); } - /** - * Sets the name of the file containing the includes patterns. - * - * @param includesfile A string containing the filename to fetch the include - * patterns from. - */ - public void setIncludesfile( final File includesfile ) - throws TaskException - { - m_fileset.setIncludesfile( includesfile ); - } - /** * add a name entry on the exclude list - * - * @return Description of the Returned Value */ - public Pattern createExclude() - throws TaskException + public void addExclude( final Pattern pattern ) { - return m_fileset.createExclude(); - } - - /** - * add a name entry on the include files list - * - * @return Description of the Returned Value - */ - public Pattern createExcludesFile() - throws TaskException - { - return m_fileset.createExcludesFile(); + m_fileset.addExclude( pattern ); } /** * add a name entry on the include list - * - * @return Description of the Returned Value - */ - public Pattern createInclude() - throws TaskException - { - return m_fileset.createInclude(); - } - - /** - * add a name entry on the include files list - * - * @return Description of the Returned Value */ - public Pattern createIncludesFile() + public void addInclude( final Pattern pattern ) throws TaskException { - return m_fileset.createIncludesFile(); + m_fileset.addInclude( pattern ); } /** diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java index 500a2130e..2c7da53d6 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java @@ -16,6 +16,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.StringTokenizer; import org.apache.myrmidon.api.TaskException; +import org.apache.myrmidon.framework.Pattern; import org.apache.aut.nativelib.Os; import org.apache.aut.nativelib.ExecOutputHandler; import org.apache.tools.ant.types.DirectoryScanner; @@ -951,7 +952,7 @@ public class Javadoc pkg += "*"; } - fs.createInclude().setName( pkg ); + fs.addInclude( new Pattern( pkg ) ); }// while e = excludePackages.iterator(); @@ -964,7 +965,8 @@ public class Javadoc pkg += "*"; } - fs.createExclude().setName( pkg ); + final Pattern pattern = new Pattern( pkg ); + fs.addExclude( pattern ); } PrintWriter packageListWriter = null; diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java index bdd6626ed..0d0f61db2 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ide/VAJExport.java @@ -144,19 +144,17 @@ public class VAJExport extends VAJTask * * @return Description of the Returned Value */ - public Pattern createExclude() + public void addExclude( final Pattern pattern ) { - return patternSet.createExclude(); + patternSet.addExclude( pattern ); } /** * add a name entry on the include list - * - * @return Description of the Returned Value */ - public Pattern createInclude() + public void addInclude( final Pattern pattern ) { - return patternSet.createInclude(); + patternSet.addInclude( pattern ); } /** diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/unix/Chmod.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/unix/Chmod.java index af88ac7c7..c570f7fad 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/unix/Chmod.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/unix/Chmod.java @@ -83,10 +83,10 @@ public class Chmod public void setFile( File src ) throws TaskException { - FileSet fs = new FileSet(); - fs.setDir( new File( src.getParent() ) ); - fs.createInclude().setName( src.getName() ); - addFileset( fs ); + final FileSet fileSet = new FileSet(); + fileSet.setDir( new File( src.getParent() ) ); + fileSet.addInclude( new Pattern( src.getName() ) ); + addFileset( fileSet ); } /** @@ -116,32 +116,26 @@ public class Chmod /** * add a name entry on the exclude list - * - * @return Description of the Returned Value */ - public Pattern createExclude() - throws TaskException + public void addExclude( final Pattern pattern ) { m_defaultSetDefined = true; - return m_defaultSet.createExclude(); + m_defaultSet.addExclude( pattern ); } /** * add a name entry on the include list - * - * @return Description of the Returned Value */ - public Pattern createInclude() + public void addInclude( final Pattern pattern ) throws TaskException { m_defaultSetDefined = true; - return m_defaultSet.createInclude(); + m_defaultSet.addInclude( pattern ); } /** * add a set of patterns * - * @return Description of the Returned Value */ public PatternSet createPatternSet() throws TaskException diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/FileSet.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/FileSet.java index cb4a5211c..096beeb8d 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/FileSet.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/FileSet.java @@ -68,16 +68,6 @@ public class FileSet m_defaultPatterns.setExcludes( excludes ); } - /** - * Sets the name of the file containing the includes patterns. - * - * @param excl The file to fetch the exclude patterns from. - */ - public void setExcludesfile( final File excludesfile ) - { - m_defaultPatterns.setExcludesfile( excludesfile ); - } - /** * Sets the set of include patterns. Patterns may be separated by a comma or * a space. @@ -89,16 +79,6 @@ public class FileSet m_defaultPatterns.setIncludes( includes ); } - /** - * Sets the name of the file containing the includes patterns. - * - * @param incl The file to fetch the include patterns from. - */ - public void setIncludesfile( final File includesfile ) - { - m_defaultPatterns.setIncludesfile( includesfile ); - } - public void setupDirectoryScanner( final FileScanner ds ) throws TaskException { @@ -164,33 +144,17 @@ public class FileSet /** * add a name entry on the exclude list */ - public Pattern createExclude() - { - return m_defaultPatterns.createExclude(); - } - - /** - * add a name entry on the include files list - */ - public Pattern createExcludesFile() + public void addExclude( final Pattern pattern ) { - return m_defaultPatterns.createExcludesFile(); + m_defaultPatterns.addExclude( pattern ); } /** * add a name entry on the include list */ - public Pattern createInclude() - { - return m_defaultPatterns.createInclude(); - } - - /** - * add a name entry on the include files list - */ - public Pattern createIncludesFile() + public void addInclude( final Pattern pattern ) { - return m_defaultPatterns.createIncludesFile(); + m_defaultPatterns.addInclude( pattern ); } public PatternSet createPatternSet()