Title: Message
You don't show what your template looks like so far but I don't think any of the standard taghandlers has a fieldCount or getterPropertyCount, which would be needed to produce "x,y".
 
Write your own taghandler to get it done.  For example, extend FieldTagsHandler and add a
 
public String fieldCount(){
   //iterate and get and return number of fields as a String...
}
 
With that method added you should be able to use it along with the standard tags to produce "x,y".
 
Or, less reusable in general but simplifying your .xdt file, you can add a method in the new taghandler that produces "x,y" directly.
 
Brian
----- Original Message -----
Sent: Tuesday, November 11, 2003 5:20 AM
Subject: [Xdoclet-user] question regarding custom template

Hi all
 
I'm trying to write a custom template, which creates out of:
public class A {
  public int x;
  public int y;
  public getX() {...}
  public getY() {...}
}
 
something like:
A
(
  x,
  y
)
 
I'm currently using the TemplateSubTask and I haven't found away to get rid of the comma after the last method.
Is there a way of adding a comma after each method except for the last one?
 
Thanks,
Rene
 

Reply via email to