ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: [DISC] core extensions
Date Wed, 28 Mar 2001 08:23:55 GMT
Michael McCallum <> wrote:

[the quoted question below is mine - Stefan]

>>why should Task be an interface?

> Basically it is not necessary for task to be an abstract/conrete
> class.

It depends on how strong you want to make the contract between Tasks
and the core.

If you want to make sure that Task.getLogger always returns the logger
from the TaskContext supplied earlier, you cannot do that when relying
on interfaces only - same for all the other things Peter calls aspects
of a task.

If you provide an interface and tell people "but you must implement
method X so that ..." there is not much you gain, just to avoid
adapters in cases where you need to extend another class for your

In Ant1 Task is an abstract class and we provide TaskAdapter for all
other situations - is anybody using TaskAdapter?


View raw message