git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270836 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -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 ); | |||
| } | |||
| /** | |||
| @@ -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; | |||
| @@ -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 ); | |||
| } | |||
| /** | |||
| @@ -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 | |||
| @@ -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() | |||
| @@ -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 ); | |||
| } | |||
| /** | |||
| @@ -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; | |||
| @@ -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 ); | |||
| } | |||
| /** | |||
| @@ -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 | |||
| @@ -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() | |||