ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: polymorphism (was Re: antlib)
Date Fri, 25 Apr 2003 10:40:14 GMT
On Friday 25 April 2003 10:42, Stefan Bodewig wrote:
> Yes, that's one way to implement it.  The tricky part starts if you
> want to support polymorphism for more than one nested element.

true.
The problem exists in CVS HEAD for TokenFilter, it can take
TokenFilter.Filter and TokenFilter.Tokenizer objects. Suppose
an  object implements both interfaces?. The current code
just treats it as a TokenFilter.Filter.

>
> Say class PathThatIgnoresBuildSysclassPathToTrickGump extends Path
> and you want to use it in <javac> which has several nested elements
> that are Paths.
I do not see the problem here: suppose Path implements 
  dynamicElement(Path path)

one could do:
<javac>
   <classpath>
       <PathThatIgnoresBuildSysclassPathToTrickGump>
            <pathelement path="${classpath}"/>
       </PathThatIgnoresBuildSysclassPathToTrickGump>
   </classpath>
</javac>

Peter

Mime
View raw message