Discussion:
[Xdoclet-devel] XClass.getInterface() does not return extended interfaces
a***@freenet.de
2007-12-07 10:02:30 UTC
Permalink
Hi,

I've taken the latest code from CVS to get support for Java5 syntax support (xjavadoc-1.5.jar).
What I have observed is a bug in the generated NodeParser that causes the method
XClass.getInterfaces() to return only implemented interfaces but not extended ones.
After the follwing change in xjavadoc\javacc\Java1.5x.jjt this seems to be fixed.

void ExtendsList(boolean isInterface):
{
SourceClass sourceClass = currentClass();
String name = null;
}
{
"extends" name=ClassOrInterfaceType()
{
if (isInterface) sourceClass.addInterface(name);
}

( "," name=ClassOrInterfaceType()
{
if (isInterface)
sourceClass.addInterface(name);
else
throw new ParseException("A class cannot extend more than one other class");
})*

{
//System.err.println("setSuperclass name=" + (name != null ? name : "java.lang.Object"));
sourceClass.setSuperclass(name != null ? name : "java.lang.Object");
}
}


So, I'm not familar with javacc, maybe someone can re-check that modification.

Kind regards,

André




"Jetzt Handykosten senken mit klarmobil - 14 Ct./Min.! Hier klicken"
http://produkte.shopping.freenet.de/handy_voip_isdn/klarmobil/indexhtml?pid=730025
Loading...