donaldp 01/02/20 00:09:26
Added: proposal/myrmidon/src/java/org/apache/ant/util ItemSet.java
Mapper.java Scanner.java
Log:
Added in sketch of new item set type approach which is generalisation of
current system.
Revision Changes Path
1.1
jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/util/ItemSet.java
Index: ItemSet.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 file.
*/
package org.apache.ant.util;
import org.apache.ant.tasklet.DataType;
/**
* Interface for ItemSet.
* An item set contains a number of items. Example item sets include
* PatternSets, FileSets, FilterSets etc.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
*/
public interface ItemSet
extends DataType
{
/**
* Returns an array containing the items(s) contained within set.
*
* Question: should ItemSet be context sensitive????
*/
Object[] getItems( /* Context context??? */ );
}
1.1
jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/util/Mapper.java
Index: Mapper.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 file.
*/
package org.apache.ant.util;
import org.apache.ant.tasklet.DataType;
/**
* Interface for Mappers.
* Mappers are responsible for mapping source items to targets items.
* Example mappers will map source files to destination files
* (ie A.java to A.class).
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Stefan Bodewig</a>
*/
public interface Mapper
extends DataType
{
/**
* Returns an array containing the target items(s) for the
* given source file.
*
* <p>if the given rule doesn't apply to the input item,
* implementation must return null. Scanner will then
* omit the item in question.</p>
*
* @param item the item to be mapped
*/
Object[] mapItem( Object item );
}
1.1
jakarta-ant/proposal/myrmidon/src/java/org/apache/ant/util/Scanner.java
Index: Scanner.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 file.
*/
package org.apache.ant.util;
import org.apache.avalon.Component;
/**
* Interface for Scanners.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
*/
public interface Scanner
extends Component
{
}