You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Magesh Umasankar <um...@rediffmail.com> on 2001/12/03 18:13:31 UTC
setFoo parameter priority
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>