Browse Source

Add an abstract task that will eventually take over the role of the original Matching task

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271332 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
ccbf334323
1 changed files with 64 additions and 0 deletions
  1. +64
    -0
      proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractMatchingTask.java

+ 64
- 0
proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractMatchingTask.java View File

@@ -0,0 +1,64 @@
/*
* 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 org.apache.myrmidon.api.AbstractTask;
import org.apache.tools.ant.types.FileSet;

/**
* An abstract base class for tasks that wish to operate on
* a set of files. This class is based on the ant1.x MatchingTask and
* should fullfill similar requirements.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @version $Revision$ $Date$
*/
public abstract class AbstractMatchingTask
extends AbstractTask
{
private FileSet m_fileset = new FileSet();

/**
* The attribute that contains a list of itesm to be included.
*/
public void setIncludes( final String includes )
{
m_fileset.setIncludes( includes );
}

/**
* The attribute that contains a list of items to be excluded.
*/
public void setExcludes( final String excludes )
{
m_fileset.setExcludes( excludes );
}

/**
* Set this to true to use the defaul exclude patterns.
*/
public void setDefaultexcludes( final boolean useDefaultExcludes )
{
m_fileset.setDefaultExcludes( useDefaultExcludes );
}

public void addInclude( final Pattern pattern )
{
m_fileset.addInclude( pattern );
}

public void addExclude( final Pattern pattern )
{
m_fileset.addExclude( pattern );
}

public void addPatternSet( final PatternSet set )
{
m_fileset.addPatternSet( set );
}
}

Loading…
Cancel
Save