ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <>
Subject Re: setFoo parameter priority
Date Tue, 04 Dec 2001 16:47:24 GMT

I have attached a proposed patch to
Please take a look and send in your comments.  It doesn't
modify an awful lot - in fact it has more comments than 
code ;-)

If you find this ok, then I will star working on 
converting tasks that take in String arguments to setFoo
methods, where taking in some other type of argument will
make sense.


From: "Magesh Umasankar" <>
> 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, 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

View raw message