Hi,

I am trying to do a relatively simple task but I am having a really tough time doing it.  I have a databean class, and I want to generate some code that uses this databean.    I have created a template and I have a ant target.

In the template, I only use the following tags:
<XDtPackage:packageOf><XDtClass:fullClassName/></XDtPackage:packageOf>;
<XDtClass:className/>

My ant target looks like:
       
    <target name="xdoclet:init">
      <taskdef
          name="datalistdoclet"
          classname="xdoclet.DocletTask"
          classpathref="path:lib.xdoclet"
          />
    </target>

        <target name="datalistdoclet" depends="xdoclet:init">

                        <path id="dataFilePath">
                            <fileset dir="${dir.src.java}">
                                <include name="**/${data.name}.java"/>
                            </fileset>
                        </path>
                <pathconvert targetos="${targetos}" property="dataFilePath" refid="dataFilePath">
          <map from="" to=""/>
        </pathconvert>
        <echo message="Data Bean Source File: ${dataFilePath}"/>
                       
                <datalistdoclet destdir="${dir.src.java}"
                excludedtags="@version,@author,@return,@exception">
                                  <fileset dir="${dir.src.java}">
                                    <include name="**/${data.name}.java" />
                                  </fileset>
                                  <template templateFile="src/misc/xdoclet/ArrayList.xdt"
                            destinationFile="{0}List.java" />
                </datalistdoclet>
        </target>


This works, however sometimes it generates extra classes.  I have traced the source code, and the process seems to recursively traverse the import statements of my databean.  If the process encounters a class that includes an inner class it will generate code for this inner class as well.

How do I prevent the process from recursively traversing the import statements?  How do I prevent it from generating Inner Classes?

thank you,

Mohit


Reply via email to