Wow! N factorial classes! The built in mechanism handles one-output-for-all-matching-classes and one-output-for-each-class ({0}) cases. There's no one-output-for-each-method-of-classes support in TemplateSubTask. So <template blabl/> is of no help here, you have to derive from it and write some code to handle it. It's very easy, take a look at one of the subclasses (say EntitypkSubTask) and TemplateSubTask's code. You do something like getCurrentClass().getMethods() then loop over it and do something similar to TemplateSubTask.generatePerClass(). Dig in the code :-)
Ara. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:xdoclet-devel- > [EMAIL PROTECTED]] On Behalf Of Breslow, Marc > Sent: Wednesday, July 03, 2002 1:53 AM > To: 'Ara Abrahamian'; [EMAIL PROTECTED] > Subject: RE: [Xdoclet-devel] Creating my own generator on XDoclet > > Thanks Ara. I see how to achieve this for creating n artifacts for 1 > interface. What I'm unclear about is how to generate n+xn artifacts where > x > equals the number of methods defined on my interface. > > For instance, assume my interface is called IService and has 3 methods: > doMethod1(), doMethod2() and doMethod3() > > I want to generate the following files: > IServiceProxyImpl.java, > IService.properties, > doMethod1ReqMessageStructure.java, > doMethod1ReplyMessageStructure.java, > doMethod2ReqMessageStructure.java, > doMethod2ReplyMessageStructure.java, > doMethod3ReqMessageStructure.java, > doMethod3ReplyMessageStructure.java > > How do I proceed? > > Thanks. > ---Marc > > -----Original Message----- > From: Ara Abrahamian [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 02, 2002 5:14 PM > To: 'Breslow, Marc'; [EMAIL PROTECTED] > Subject: RE: [Xdoclet-devel] Creating my own generator on XDoclet > > > > I'm trying to leverage the XDoclet framework to develop some wrapper > > classes > > for an interface. I'd like to specify the interface or interfaces > that > > need > > code generated for them via the ant task. In addition, there are a > few > > configuration properties that I've referenced in my .j templates that > need > > to be passed in. > > > > I'm a little confused about how to string everything together. > > > > From one interface, I need to generate: > > 1 properties file > > 1 class that implements that interface (using template A) > > 1 class for each method defined in the interface (using template B) > > 1 class for each method defined in the interface (using template C) > > > > I'm pretty comfortable with the templates I've created. I need help > > executing the code generator using ant. Any pointers? > > Define a <template/> nested element in your ejbdoclet/whateverdoclet > element. Configure it to point to your template files and specify its > destdir/etc parameters. See docs for <template/> (parent of all > subtasks). You can also search the xdoclet-user archives for various > samples. > > Ara. > > > ------------------------------------------------------- > Sponsored by: > ThinkGeek at http://www.ThinkGeek.com/ > _______________________________________________ > Xdoclet-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/xdoclet-devel ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek No, I will not fix your computer. http://thinkgeek.com/sf _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel