From: Lendvai Attila <Attila.Lendvai@ne...> - 2004-04-07 07:53:33
:: On Tue, Apr 06, 2004 at 12:08:32PM +0200, Lendvai Attila wrote:
:: > i've started to work on the ant replacement i've planned.=20
:: and i would=20
:: > like to add some extras to BeanShell, for exaple check for=20
:: > with reflection so that everything can be enumerated that has an
:: > iterator() method.
:: Hi, version 2.0b1 has a new iteration API that allows the=20
:: enhanced for-loop to
:: work with any kind of collection, array, etc. It's=20
:: available in a tar ball at
:: I am working on getting 2.0b1 into CVS right now.
thanks, i've seen it. altough this patch of mine is a final generic
case. i iterator over FileSet's that are my own structures. they have
iterator but nothing else of the Collection interface...
i've solved the issue with reflection:
public BshIterator getBshIterator( Object obj )=20
if ( obj instanceof Collection || obj instanceof
return new CollectionIterator( obj );
Method iteratorGetter =3D
Iterator iterator =3D
return new CollectionIterator(iterator);
catch (Exception ignore)
return new bsh.CollectionManager.BasicBshIterator( obj
:: > seems like the cvs (as given on the site, and from where=20
:: i've checked=20
:: > out the sources) is broken...
:: As in, broken broken or just not containing the 2.0 source?
yesterday it war broken broken, but now it still does not contain the
2.0 sources. could be the sf.net read-only cvs delay, so just wait for
one more day.
Get latest updates about Open Source Projects, Conferences and News.