ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Burton" <bi...@progress.com>
Subject Re: [PATCH] FIltersets with all the pieces this time :)
Date Fri, 16 Mar 2001 04:15:38 GMT
Hello Michael,

This looks interesting.  However, Ant 1.x must work with a 1.1 JVM so you
can't use HashMap, etc.  Ant 2 is another matter but there's no tree to
patch against yet :) .

-Bill

Michael McCallum wrote:
> 
> Here it goes.
> 
> Has both the filterset type and the patch. This also includes the
> addition of conditionals to Exit. ie if/unless.
> 
> Michael
> 

<snip/>

> // java util classes
> import java.util.Enumeration;
> import java.util.HashMap;

> import java.util.Properties;
> import java.util.Vector;
> 
> // ant classes
> import org.apache.tools.ant.BuildException;
> import org.apache.tools.ant.Project;
> import org.apache.tools.ant.Task;
> 
> /**
>  * A set of filters to be applied to something.
>  *
>  * @author    <A href="mailto:gholam@xtra.co.nz">Michael McCallum</A>
>  * @created   14 March 2001
>  */
> public class FilterSet extends DataType {
>   public final static String TOKEN_START = "@";
>   public final static String TOKEN_END = "@";
> 

<snip/>

>   /**
>    * Gets the filter hash of the FilterSet.
>    *
>    * @return   The hash of the tokens and values for quick lookup.
>    */
>   private HashMap getFilterHash() {
>     HashMap filterHash = new HashMap( filters_.size() );
>     for( int filterCounter = 0; filterCounter < filters_.size(); filterCounter++ )
{
>       Filter filter = ( Filter ) filters_.elementAt( filterCounter );
>       filterHash.put( filter.getToken(), filter.getValue() );
>     }
>     return filterHash;
>   }

Mime
View raw message