Sorry for the somewhat confusing information.  Let me explain it in more
detail.

Here are the abstract classes:
    public abstract class AbstractTask
    public abstract class AbstractContainerTask extends AbstractTask

Here are the concrete classes:
    public class Fail extends AbstractTask
    public class Log extends AbstractTask
    public class LoadProperties extends AbstractContainerTask
    public class Property extends AbstractContainerTask

All four of the concrete classes have class-level tag '@ant:task
name="...."'

My original template had this iterator:
        <XDtClass:forAllClasses type="org.apache.myrmidon.api.AbstractTask"
extent="hierarchy">

With that it only picked up Fail and Log, but missed LoadProperties and
Property.  Shouldn't it have picked those up also?

I changed the iterator to this:
    <XDtClass:forAllClasses abstract="true"
type="org.apache.myrmidon.api.AbstractTask" extent="hierarchy">

adding 'abstract="true"' to the XDtClass:forAllClasses, not the <template>
tag in build.xml.

Hopefully that straightens out the confusion.  Am I correct in that my first
iterator should have picked up the two classes it missed?  If not, why not?

Thanks,
    Erik

----- Original Message -----
From: "Ara Abrahamian" <[EMAIL PROTECTED]>
To: "'Erik Hatcher'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Sunday, January 13, 2002 2:16 AM
Subject: RE: [Xdoclet-user] XDtClass:forAllClasses extent question


> > A question about the 'extent' attribute on forAllClasses -  I've got
> the
> > following in a template:
> >
> >     <XDtClass:forAllClasses
> type="org.apache.myrmidon.api.AbstractTask"
> > extent="hierarchy">
> >
> > And some classes extend from AbstractContainerTask, which extends from
> > AbstractTask.  The classes where I've put the tag I'm interested in
> are
> > not
> > abstract.  I added 'abstract="true"' and it picked up the two
> > AbstractContainerTask extending classes.  I'm confused on the
> 'abstract'
> > attribute.  I thought it meant to either include or exclude actual
> > abstract
> > classes, but it does not seem to be the case since the only classes it
> > picked up additionally were not abstract, just going through another
> layer
> > of abstract super class though.
>
> "Extent" defines the extent of the hierarchy search, concrete->1 level,
> superclass->2 level, hierarchy->n level.
>
> Maybe I'm wrong but what's this abstract="true" you're talking about?
> There's no such a thing in TemplateSubTask.
>
> Anyway TemplateSubTask has room for improvements. abstract="true" could
> be one of these improvements. If you think something is missing then
> don't hesitate to file a feature request for it and we'll implement it
> (even better you implement and I'll commit it!).
>
> Ara.
>
>
>


_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to