ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <>
Subject Re: Use of reflection in DirectoryScanner to remove duplicated code
Date Tue, 05 Sep 2006 13:20:13 GMT
> I'm interested in this mainly as an academic exercise, because I see
> using reflection as the only dynamic behaviour that Java offers and
> it allows for some 'tricks' (for want of a better phrase) to write
> less code.  I'm also interested in the sort of reception that this
> kind of code gets - most people who I've worked with (Java
> programmers) hate it, but some people (Perl programmers) think it's a
> nice solution to a problem.

Reflection is not bad in itself, but be aware that it's gotten a lost
faster in newer JDK, so your perf test on JDK 1.5, which shows no slow
down, might do terribly on JDK 1.2 for example.

I suspect Java jocks avoid reflection more because of the ugly syntax
than any other reasons (at least with using a recent JDK with fast
reflection). --DD

PS: No I don't have access to the trees any more. I'm -1 on making
DirScanR slower for sure ;-) Regarding this change, I'm -0 until
tested on a 10/15 level deep hierarchy, but with thousands of files,
with some dirs having a large number of files. I think these were the
"crucial" caracteristics of the trees I had.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message