Thanks Andrew, this is very helpful.

Andrew Stevens <[EMAIL PROTECTED]> wrote:
On Wed, 2003-07-30 at 23:35, Mich F wrote:
> I have a situation like this:
>
> BaseBean
> {
> public final void foo()
> {..}
> }
>
> -----------------------------
> Bean1 extends BaseBean
> {
> / * @ejb:interface-method view-type="remote" */
> public String getName()
> { .....
> }
> }
>
> I want the method foo() in the BaseBean to be put into the interface,
> but I dont want to set * @ejb:interface-method view-type="remote"
> in the BaseBean for foo(), since there are other beans extend it too,
> but dont need the foo() in their interfaces. BTW, the BaseBean doesn't
> have interfaces.
>
> Is there a way in Xdoclet to do this? like hardcode a method into the
> interface?

If it wasn't for the "final" modifier on the method in BaseBean, I'd
have suggested including a method with the same signature in Bean1 that
just calls super.foo() and tag that as an interface-method. But because
it's declared final, I don't think that would even compile. Does foo()
absolutely have to be final?

Alternatively, does the method in Bean1 really have to be named foo, or
could Bean1 just contain a foo2() (tagged as the interface-method) which
calls foo()?

A third option could be to use the interface template's
remote-custom.xdt/local-custom.xdt merge point to include some code that
tests for a custom class-level tag (@mich.includefoo ?) and adds the
method if it's found. Then you only include that tag in Bean1 (and any
others that need foo() exposed).


Andrew.



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user


Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

Reply via email to