ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Q about implementation of nested elements
Date Wed, 22 Aug 2001 05:39:28 GMT
On Tue, 21 Aug 2001, Andreas Schildbach <andreas@schildba.ch> wrote:

> My understanding is that I have to both implement a class for "t"
> and "ne".

Right.

> According to the documentation, I also created a method "public void
> addNe(ne)" in class "t". The doc didn't specify whether to uppercase
> the first letter of the element name or not, but I assumed so.

You are correct.

> I did _not_ implement a method "public ne createNe()", because the
> doc does not eleborate on the semantics of this method.

You need either addNe or createNe, not both of them - in the first
case ne needs a public no-arg constructor, in the second case t is
responsible for creating the ne instance.

> I added a Taskdef for "t" and tried both adding a Typedef and
> nothing for "ne".

"nothing" should be enough.

> The doc does not tell how Ant is going to find the implementing
> class for "ne".

By looking at the argument of your addNe method.

> Regardless of what I try, I get an error message: The <t> task
> doesn't support the nested "ne" element.

It would be better to see some real code to get this further.

Stefan

Mime
View raw message