ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: new Task subclass
Date Wed, 21 Jul 2004 05:45:33 GMT
> I was thinking more along the lines of:
> 
> public abstract class IfUnlessTask extends Task {
>   protected String ifCondition,unlessCondition;
>   public void setIf(String ifc) ...
>   public void setUnless(String unc) ...
>   protected boolean conditionsAreValid()...
> 
>   public void execute() throws BuildException {
>     if (conditionsAreValid()) {
>       doExecute();
>     }
>   }
> 
>  protected abstract void doExecute() throws BuildException;
> }
> 
> So that subtasks only need to implement the doExecute() function. 

I knew.
But there is the hierarchy-depth problematic.
And if ALL tasks should have such a if/unless-handling the right place is
inside
oata.Task itself, so all tasks will have that implicit. And why only tasks?
Why
not all ProjectComponents? But we havent any consensus about if/unless
handling,
so that wouldnt make sence.


Jan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message