----- Original Message ----- From: "Jose Alberto Fernandez" <[EMAIL PROTECTED]> To: "Ant Developers List" <[EMAIL PROTECTED]>; "Magesh Umasankar" <[EMAIL PROTECTED]> Sent: Saturday, January 05, 2002 7:23 PM Subject: Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types
>An additional reason why I have problems with your approach is that >it assumes that parameters must be valid at the time the attribute is set, >and not when they are actually used (execute). Although the two events >may occur at close time for most tasks, this may not be the case for >always, like for example in the case of a DataType. >For datatypes, you may have the declaration operation ( when the attributes >are set) happening quite early in the build process, while the actual usage of the >datatype by some task may occur much later. in such cases we may want to >wait for the validation to occur when the reference is used. This is an important issue, which I am glad you have pointed out. 1. scripting in ant can be used to set properties way, way, before the task is executed 2. if you subclass a task, you could override set methods to bypass validation, For both those reasons, there is significant merit in performing validation at execute time, rather than assuming that by the time the method is called all inputs are valid. This would argue for the setters being simple, and the validation code, whether done by hand, through some FileObject.mustBeSrc(), or by validator.mustBeSrc(File) calls. -steve -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
