----- Original Message -----
From: "stephan beal" <[EMAIL PROTECTED]>
To: "Ant Developers List" <[EMAIL PROTECTED]>
Sent: Sunday, March 24, 2002 10:42 AM
Subject: Re: Cvs <commandline> implementation question...
> On Sunday 24 March 2002 04:55 am, Adam Murdoch wrote:
> > The difference is mainly in where the object gets instantiated. For an
> > addX() method, Ant instantiates it. For a createX() method, the
task/type
> > instantiates it.
>
> Is implementing both createX() and addX() considered evil (or just bad
> style)?
What would be the point? Only one will get invoked if "X" is the same.
>From a quick glance at IntrospectionHelper, the order it finds them in is
"create", "addConfigured", and then "add".
And like Adam said, addX is preferred so that subclassed (!!) types can be
substituted by Ant rather than the concrete class in the addX signature.
That opens up a lot of cool options.
Erik
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>