donaldp 02/02/14 02:50:59
Modified: proposal/myrmidon/src/java/org/apache/antlib/file
FilteredCopyTask.java
Added: proposal/myrmidon/src/java/org/apache/myrmidon/framework
FilterSetCollection.java
Removed: proposal/myrmidon/src/main/org/apache/tools/ant/types
FilterSetCollection.java
Log:
Move FilterSetCOllection into framework classes
Revision Changes Path
1.1
jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/FilterSetCollection.java
Index: FilterSetCollection.java
===================================================================
/*
* 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.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
* different start/end token settings.
*
* @author <A href="mailto:[EMAIL PROTECTED]">Conor MacNeill</A>
*/
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;
}
}
1.2 +2 -2
jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/file/FilteredCopyTask.java
Index: FilteredCopyTask.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/antlib/file/FilteredCopyTask.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FilteredCopyTask.java 10 Feb 2002 00:17:43 -0000 1.1
+++ FilteredCopyTask.java 14 Feb 2002 10:50:59 -0000 1.2
@@ -24,7 +24,7 @@
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
@@ -32,7 +32,7 @@
*
* @ant:task name="filtered-copy"
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
- * @version $Revision: 1.1 $ $Date: 2002/02/10 00:17:43 $
+ * @version $Revision: 1.2 $ $Date: 2002/02/14 10:50:59 $
*/
public class FilteredCopyTask
extends CopyTask
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>