ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: [myrmidon] add TaskContext.getService()
Date Wed, 30 Jan 2002 08:29:03 GMT

On Sat, 26 Jan 2002 17:14, Adam Murdoch wrote:
> > I tend to think of services as different from types. Services
> > persist over
> > the length of the ant "execution" or at least the "workspace
> > execution" or
> > whatever term we were using for this. Types are created by tasks while
> > serviuces never can be etc.
> Exactly.  And that's why they would use different roles, to distinguish
> between what they are and how they should be used.  But that doesn't mean
> the same infrastructure shouldn't be available to both services and
> data-types.

I think we mean different things when we are talking about services vs types. 
When I think of services I tend to think that the services are a 
semi-singleton available throughout the execution of all tasks. Where types 
are created and used as needed. 

For instance - consider the Javac task. It would use the JavacExecManager 
service. Depending on parameters passed in the JavacExecManager would use a 
JavaCompilerAdaptor object (ie Jikes, Modern, GCJ whatever).

So in this case the task does not directly interact with the GCJ/Jikes/etc 
types but instead acts through the service which would in turn use the types. 



|  Hlade's Law: If you have a difficult task, give it  |
|     to a lazy person -- they will find an easier     |
|                    way to do it.                     |

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message