ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@rediffmail.com>
Subject setFoo parameter priority
Date Mon, 03 Dec 2001 17:13:31 GMT

Hi,
I notice that there are a few places where setFoo takes
in String as parameter, where having a custom class
would make it better.  For example, Tar.java uses
setLongFile(String mode).  If we had setLongFile(TarMode)
IMHO it would be better, as we could encapsulate
features like validations, etc. inside it.  For 
backwards compatibility, setLongFile(String) would stay 
but invoke setLongFile(TarMode).  But this would mean 
refactoring the logic in IntrospectionHelper a bit.  I 
propose the following change:

If a task contains a setFoo(String) *and* setFoo(Bar),
setFoo(Bar) gets invoked by the introspection mechanism.
In other words, setFoo(String) gets a lower priority
when compared to setFoo(Bar).

What are your opinions?

Magesh
 


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message