Paolo
See
http://jira.codehaus.org/browse/XDP-86
http://jira.codehaus.org/browse/XDP-72

I believe this is the same problem as you have.

Classpath problems.

Diogo

> Hi Guys,
> I'm in trouble with a feature I wanna add to my Tapestry plugin:
> I'd like to generate specification files only for classes which implements
> a
> specific tapestry interface (eg. org.apache.tapestry.IPage) either
> directly
> or extending some implementing base class, so I implemented the
> shouldGenerate method this way :
>
> public boolean shouldGenerate(Object metadata) {
> JavaClass clazz = (JavaClass) metadata;
> boolean hasASpecification =
> clazz.getTagByName("tapestry.page-specification")
> != null;
> boolean isAPage = clazz.isA("org.apache.tapestry.IPage");
> return hasASpecification && isAPage ;
> }
>
> As far as I can see, the method JavaCass.isA(..) is only looking at my
> JavaClass not its ancestors. That means I cannot use my tags this way :
>
> class MyBasePage implements org.apache.tapestry.IPage {
> // my stuff
>  }
>
> /**
> * @tapestry.page-specification
> */
> class MyPage extends MyBasePage {
>  // my stuff
>  }
>
> JavaClass.isA(.."...IPage") would return false for "MyPage.java".
> I even tried to dig into JavaClass.getSuperJavaClass() recursively but it
> doesn't solve the problem. I mean, it does solve the problem above BUT
> usually a base page would be implemented via a tapestry's BasePage
> implementation. That obvoiusly breaks again the chain..
>
> I suppose the same problem could happen in web-plugin if we put xdoclet
> tags
> on a class which doesn't extend directy eg. HttpServlet. but honestly I
> haven't tried yet.
>
> Am I making a big mistake?
> Could you point me to the right direction..
>
> Paolo
>




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
xdoclet-plugins-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest

Reply via email to