From 48f9b90a7f56be4ab27122a4d862a95c76e19c36 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Thu, 14 Feb 2002 10:51:21 +0000 Subject: [PATCH] Move FilterSetCOllection into framework classes git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271338 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/antlib/file/FilteredCopyTask.java | 2 +- .../framework}/FilterSetCollection.java | 3 +- .../org/apache/tools/ant/util/FileUtils.java | 2 +- .../tools/ant/types/FilterSetCollection.java | 51 ------------------- .../org/apache/tools/ant/util/FileUtils.java | 2 +- 5 files changed, 5 insertions(+), 55 deletions(-) rename proposal/myrmidon/src/{main/org/apache/tools/ant/types => java/org/apache/myrmidon/framework}/FilterSetCollection.java (94%) delete mode 100644 proposal/myrmidon/src/todo/org/apache/tools/ant/types/FilterSetCollection.java diff --git a/proposal/myrmidon/src/java/org/apache/antlib/file/FilteredCopyTask.java b/proposal/myrmidon/src/java/org/apache/antlib/file/FilteredCopyTask.java index b796f17f9..c61a873a6 100644 --- a/proposal/myrmidon/src/java/org/apache/antlib/file/FilteredCopyTask.java +++ b/proposal/myrmidon/src/java/org/apache/antlib/file/FilteredCopyTask.java @@ -24,7 +24,7 @@ import java.util.ArrayList; import org.apache.avalon.excalibur.io.IOUtil; import org.apache.myrmidon.api.TaskException; import org.apache.tools.ant.types.FilterSet; -import org.apache.tools.ant.types.FilterSetCollection; +import org.apache.myrmidon.framework.FilterSetCollection; /** * A task used to copy files and simultaneously apply a diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/types/FilterSetCollection.java b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/FilterSetCollection.java similarity index 94% rename from proposal/myrmidon/src/main/org/apache/tools/ant/types/FilterSetCollection.java rename to proposal/myrmidon/src/java/org/apache/myrmidon/framework/FilterSetCollection.java index 93b24674d..237a9f94a 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/types/FilterSetCollection.java +++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/FilterSetCollection.java @@ -5,11 +5,12 @@ * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ -package org.apache.tools.ant.types;// java io classes +package org.apache.myrmidon.framework; import java.util.ArrayList; import java.util.Iterator; import org.apache.myrmidon.api.TaskException; +import org.apache.tools.ant.types.FilterSet; /** * A FilterSetCollection is a collection of filtersets each of which may have a diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/util/FileUtils.java b/proposal/myrmidon/src/main/org/apache/tools/ant/util/FileUtils.java index 0af05e3a0..e92f9413d 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/util/FileUtils.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/util/FileUtils.java @@ -21,7 +21,7 @@ import java.util.StringTokenizer; import org.apache.avalon.excalibur.io.FileUtil; import org.apache.avalon.excalibur.io.IOUtil; import org.apache.myrmidon.api.TaskException; -import org.apache.tools.ant.types.FilterSetCollection; +import org.apache.myrmidon.framework.FilterSetCollection; import org.apache.tools.ant.types.Path; /** diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/FilterSetCollection.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/FilterSetCollection.java deleted file mode 100644 index 93b24674d..000000000 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/FilterSetCollection.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) The Apache Software Foundation. All rights reserved. - * - * This software is published under the terms of the Apache Software License - * version 1.1, a copy of which has been included with this distribution in - * the LICENSE.txt file. - */ -package org.apache.tools.ant.types;// java io classes - -import java.util.ArrayList; -import java.util.Iterator; -import org.apache.myrmidon.api.TaskException; - -/** - * A FilterSetCollection is a collection of filtersets each of which may have a - * different start/end token settings. - * - * @author Conor MacNeill - */ -public class FilterSetCollection -{ - private ArrayList m_filterSets = new ArrayList(); - - public void addFilterSet( final FilterSet filterSet ) - { - m_filterSets.add( filterSet ); - } - - /** - * Does replacement on the given string with token matching. This uses the - * defined begintoken and endtoken values which default to @ for both. - * - * @param line The line to process the tokens in. - * @return The string with the tokens replaced. - */ - public String replaceTokens( String line ) - throws TaskException - { - String replacedLine = line; - - final Iterator filterSets = m_filterSets.iterator(); - while( filterSets.hasNext() ) - { - final FilterSet filterSet = (FilterSet)filterSets.next(); - replacedLine = filterSet.replaceTokens( replacedLine ); - } - return replacedLine; - } -} - - diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/FileUtils.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/FileUtils.java index 0af05e3a0..e92f9413d 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/FileUtils.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/FileUtils.java @@ -21,7 +21,7 @@ import java.util.StringTokenizer; import org.apache.avalon.excalibur.io.FileUtil; import org.apache.avalon.excalibur.io.IOUtil; import org.apache.myrmidon.api.TaskException; -import org.apache.tools.ant.types.FilterSetCollection; +import org.apache.myrmidon.framework.FilterSetCollection; import org.apache.tools.ant.types.Path; /**