Browse Source

Move FilterSetCOllection into framework classes

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271338 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
48f9b90a7f
5 changed files with 5 additions and 55 deletions
  1. +1
    -1
      proposal/myrmidon/src/java/org/apache/antlib/file/FilteredCopyTask.java
  2. +2
    -1
      proposal/myrmidon/src/java/org/apache/myrmidon/framework/FilterSetCollection.java
  3. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/util/FileUtils.java
  4. +0
    -51
      proposal/myrmidon/src/todo/org/apache/tools/ant/types/FilterSetCollection.java
  5. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/util/FileUtils.java

+ 1
- 1
proposal/myrmidon/src/java/org/apache/antlib/file/FilteredCopyTask.java View File

@@ -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


proposal/myrmidon/src/main/org/apache/tools/ant/types/FilterSetCollection.java → proposal/myrmidon/src/java/org/apache/myrmidon/framework/FilterSetCollection.java View File

@@ -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

+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/util/FileUtils.java View File

@@ -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;

/**


+ 0
- 51
proposal/myrmidon/src/todo/org/apache/tools/ant/types/FilterSetCollection.java View File

@@ -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 <A href="mailto:conor@apache.org">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
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/util/FileUtils.java View File

@@ -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;

/**


Loading…
Cancel
Save