Dominique Devienne wrote:
> Ant-Contrib's <for> accepts any type which exposes an iterator()
oh, you have just given me an idea for a devious little java1.5 class.
something that implements Iterable, for use in the fancy for loops, but
which reflects onto a class passed in and calls the iterator() method
even if it aint from an Iterable interface. That I shall have to do..
for(Resource r:new IterableBridge<Resource>(fileset)) {
log(r.toString());
}
Can't put it in the ant source tree, of course, as it would only compile
on java1.5.
-Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
|