ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject DataType interface?
Date Sun, 03 Jun 2001 02:48:45 GMT
Hi,

A while ago I was discussing DataTypes and how we should implement them.
There was little support for a generic system like

<set-property name="foo">
  <fileset ... />
</set-property>

but instead it was indicated that we would instead create a separate task
for each data-type so it works something like

<fileset name="foo" ... />

or using aspects

<fileset ant:id="foo" ... />

This task would be repeated for all diferent datatypes (ie
fileset/patternset/file/pattern/filter/filterset/etc). 

Now because the runtime will most likely differentiate between DataTypes
and the tasks used to set the DataTypes I was wondering whether it would be
useful to have a separate marker interface to indicate DataTypes? 

ie.
class Pattern implements DataType {}
interface ItemSet extends DataType {}
class FileSet implements ItemSet {}
class FilterSet implements ItemSet {}
class PatternSet implements ItemSet {}
etc.

It would be useful in that we could use registry to instantiate DataTypes
if it did inherit/implement from a particular interface. Thoughts?

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message