ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Automagic handling of DataType References
Date Tue, 12 Dec 2000 14:30:55 GMT
Peter Donald <donaldp@apache.org> wrote:

> Hi,
> 
> I was thinking it may be a good idea to have some special case code
> to handle references. In virtually all cases any datatype
> (patternset/fileset/filterset) can be referenced by something-like
> 
> <mydatatype refid="myid" />
> 
> I was thinking that we could formalize it so that it was instead
> 
> <mydatatype-ref refid="myid"/>
> 

This is what we had in the first place <classpathref> - just without
the added magic you describe - not adding ref seemed sooo much more
convenient 8-)

> When we see the -ref extention we know that it is a reference. In
> which case we look up refid attribute. So we look up object referred
> to by "myid". We then try to add it via the standard method "void
> addMydatatype( final SomeType value );" minus the -ref
> extention. This would mean that effectively any sub-element could be
> replaced by reference without complicating either enduser or tasklet
> developers job.

No, it doesn't.

(1) Neither the enduser nor the task developer needs to care when it
comes to data types right now anyway - as the data types handle
references themselves.

(2) What you describe only works in the addXXX case, not createXXX.

Stefan

Mime
View raw message