Happy new year and sorry for the delay :o)
> Maybe to avoid a new Tag and do not have to remember to add it, should
I
> add a parameter to have something like :
>
> <XDtMethod:ifHasMethod name="..." setCurrentMethod="true/false">
>
> With a default to "true" meaning we set the current method by default.
Disagree.
> > Wasn't that the point of the hasMethod tag we discussed
> > recently (thread
> > with subject "entitycmp.j") which Ara removed because "the
> > code was the
> > same"? I assumed that ifHasMethod was therefore already
> > doing this, since
> > that was the point of the removed code...
Well, I looked at the removed code again. They are the same, except one
sets current method the other one doesn't. But the point is why should
it set current method after all? No need really, specially for a tag
which should just test something. Here is the old code:
<XDtMethod:ifHasMethod name="<XDtMethod:setterMethod/>" ...>
public void <XDtMethod:setterMethod/>( ... ) <XDtMethod:exceptionList
method="<XDtMethod:setterMethod/>"/>
{
<XDtMethod:hasMethod name="<XDtMethod:setterMethod/>"
parameters="<XDtMethod:methodType/>">
<XDtMethod:ifIsNotAbstract>
super.<XDtMethod:setterMethod/>(<XDtMethod:propertyName/>);
</XDtMethod:ifIsNotAbstract>
</XDtMethod:hasMethod>
ifHasMethod doesn't set it, so we need to specify the method we're
looking for in XDtMethod:exceptionList/etc too. hasMethod does set
current method so the nested ifIsNotAbstract (which uses
getCurrentmethod().isAbstract()) uses it. But why should it set it?
Current getter method is either abstract or not.
> > > The issue I have is that XDtMethod:ifIsNotAbstract does not work
in
> > > case a setter method is not abstract while a getter is.
Yup. Doesn't work for this case.
> > > Another solution could be to parametrized
> > XDtMethod:ifIsNotAbstract,
> > > but I think setting the current method will makes things clearer.
Yup, parameterize it, like XDtMethod:exceptionList above:
<XDtMethod:ifIsNotAbstract method="<XDtMethod:setterMethod/>"/>
You know, ifHasMethod should just check it, nothing more. Btw, isn't it
needed somewhere to check a particular method's abstractness? I mean not
the current method. So the 'method' optional parameter is something
good.
Ara.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel