Sure, here's a complete example-
Template:
<XDtMethod:forAllMethods>
<XDtMethod:ifHasMethod name="setValue">
<XDtMethod:propertyName/> (without parameter)
</XDtMethod:ifHasMethod>
<XDtMethod:ifHasMethod name="setValue" parameters="java.lang.String">
<XDtMethod:propertyName/> (with parameter)
</XDtMethod:ifHasMethod>
</XDtMethod:forAllMethods>
Class:
public class Test {
private String value;
public void setValue (String value) {
this.value = value;
}
}
Output:
value (with parameter)
<clinit> (with parameter)
clone (with parameter)
equals (with parameter)
finalize (with parameter)
class (with parameter)
hashCode (with parameter)
notify (with parameter)
notifyAll (with parameter)
registerNatives (with parameter)
toString (with parameter)
wait (with parameter)
wait (with parameter)
wait (with parameter)
Very bizarre. Notice it only generates "value" with the ifHasMethod
parameters specified. But the even stranger thing is why did it generate
all those other methods in the output?
I'm using the latest HEAD version of XDoclet (as of yesterday).
Erik
----- Original Message -----
From: "Ara Abrahamian" <[EMAIL PROTECTED]>
To: "'Erik Hatcher'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Sunday, February 17, 2002 10:04 AM
Subject: RE: [Xdoclet-user] XDtMethod:ifHasMethod ????
> I have no idea about it, it should work fine! Can you show me the rest
> of the template and the class you're running it on?
>
> Ara.
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:xdoclet-user-
> > [EMAIL PROTECTED]] On Behalf Of Erik Hatcher
> > Sent: Sunday, February 17, 2002 5:45 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [Xdoclet-user] XDtMethod:ifHasMethod ????
> >
> > I've even tried hardcoding it:
> >
> > <XDtMethod:ifHasMethod name="setXyz">
> > has method
> > </XDtMethod:ifHasMethod>
> >
> > And it still did not output "has method".
> >
> > Help!
> >
> > Thanks,
> > Erik
> >
> >
> > ----- Original Message -----
> > From: "Erik Hatcher" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, February 16, 2002 8:15 PM
> > Subject: [Xdoclet-user] XDtMethod:ifHasMethod ????
> >
> >
> > > I have a class that has:
> > >
> > > public void setXyz (String xyz)
> > >
> > > And I'm using this in a custom template:
> > >
> > > setter method = <XDtMethod:setterMethod/>
> > > <XDtMethod:ifHasMethod name="<XDtMethod:setterMethod/>">
> > > has method
> > > </XDtMethod:ifHasMethod>
> > >
> > >
> > > And it outputs:
> > >
> > > setter method = setXyz
> > >
> > > but does not output "has method".
> > >
> > > Am I missing something basic here?
> > >
> > > I've seen the syntax:
> > > <XDtMethod:ifHasMethod name="<XDtMethod:setterMethod/>"
> > > parameters="<XDtMethod:methodType/>">
> > >
> > > used to find getters (right?), but how do I find and process
> setters?
> > (my
> > > class does not have getters, only setters).
> > >
> > > Thanks,
> > > Erik
> > >
> > >
> > >
> > > _______________________________________________
> > > Xdoclet-user mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> > >
> >
> >
> > _______________________________________________
> > Xdoclet-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/xdoclet-user
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> _______________________________________________
> Xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
>
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user