ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vitaly Stulsky" <>
Subject RE: [RFE] Richer Task Specification
Date Mon, 19 Jun 2000 13:47:36 GMT
> I think this is a really good idea although I haven't looked at the
> mechanics you proposed. I had in mind a concept of a task-interface for
> which multiple task implementations could be made available. <javac> would
> be a task interface defining how all javac implementations would look. We
> could then have various task implementations such as jikes, jdk, visualcafe,
> etc. Continuing to graft these into the current Javac task via
> if (compiler.equalsIgnoreCase("classic")) {
>     doClassicCompile();
> } else if (compiler.equalsIgnoreCase("modern")) {
>     doModernCompile();
> } else if (compiler.equalsIgnoreCase("jikes")) {
>     doJikesCompile();
> } else {
>     String msg = "Don't know how to use compiler " + compiler;
>     throw new BuildException(msg);
> }
> is not very elegant (nor very OO). We would need to provide a mechanism to
> say what class provides the actual implementation of the interface. I'll go
> back and look at your proposal to see how it could do that. In the case of
> javac this would replace the use of ${build.compiler} which would probably
> be a good thing.
> I think this also addresses one of the issues raised in Pete's original mail
> that started this thread ...

Idea is a simple factoring. Taskdef could contain its implementation than it stays
without changes. From other side taskdef could be a factory for other taskdefs.
This way we should introspect not only taskdef class parameters, but also we 
should introspect the created class parameters (there are exist several ways to
perform such things - creating special factory abstract class for deriving such classes
one of this ways). Priority of introspections (who is first factory or created class) is
simple decision - of course, factory (also it could pass some standard parameters in 
special for to the created object or create several taskdefs and operate them as one).

That's brief description. If anyone is interested in further discussion, I'll be more than

glad to continue this conversation.


Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.

View raw message