On Sunday 24 March 2002 16:52 pm, Erik Hatcher wrote: > ----- Original Message ----- > From: "stephan beal" <[EMAIL PROTECTED]> > > 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.
i've come across a use for it, but i'll admit that it could also be done another way. i've done Considerable refactoring of AbstractCvsTask, and to make sure i get the noexec/quiet/etc options in the command line in the correct place, i really need to do that part of their configuration in createCommandline(). However, because of the implementation i also need to do some work in addConfiguredCommandline(). The reason for this bit is backwards compatibility: i internally convert the old 'command' into a <command> and insert it at the beginning of the Commandline vector. That way it's treated 100% consistently with cdata and <commandline> args. i'm essentially done with the <commandline> support, but the major problem with the implementation right now is that on the default 'command' i can get the args in the right order (-n/-q first), but on <commandline> args, i'm getting the objects too late for that (in addConfiguredCommandline()). i've gotta run for a movie in a bit, but after that i'll come back and submit a draft patch for anyone who's interested in commenting on the implementation and refactoring. > 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. Understood. :) ----- stephan Generic Universal Computer Guy [EMAIL PROTECTED] - http://www.einsurance.de Office: +49 (89) �552 92 862 Handy: �+49 (179) 211 97 67 Student: "Master, you must teach me the way of liberation!" Master: "Tell me who it is that binds you." Student: "No one binds me!" Master: "Then why do you seek liberation?" -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
