Here is how to implement it (in SourceClass.java):

In qualify(String), when we instantiate an UnknownClass, we wrap it in 
a ProxyClass (we'll have to dig it out of the Attic) and return the 
ProxyClass instance. This instance is also kept in a class-mamber List 
of SourceClass 

Every time an UnkownClass is instantiated in qualify(String), we store 
it in a List (class member of SourceClass). When parsing is complete, 
we go throug all the ProxyClasses in this list and try to re-qualify. 
This time we might be able to qualify some of the classes to inner 
classes (because they have now been parsed). If we do, we replace the 
ProxyClass' subject (which is an UnknownClass) with a reference to the 
SourceClass reresenting the inner class.

Does this sound ok?

Aslak

----- Original Message -----
From: "Ara Abrahamian" <[EMAIL PROTECTED]>
Date: Monday, June 24, 2002 6:18 am
Subject: RE: [Xdoclet-user] Nested classes running mbeaninterface 
subtask

> It's a known problem. I hope Aslak can fine some time to implement a
> better system for handling inner classes :-) Btw if you move the inner
> class definition to the top of the outer class it works!
> 
> Ara. 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:xdoclet-
> user-
> > [EMAIL PROTECTED]] On Behalf Of Frederick N. Brier
> > Sent: Monday, June 24, 2002 7:59 AM
> > To: [EMAIL PROTECTED]
> > Subject: [Xdoclet-user] Nested classes running mbeaninterface 
> subtask> 
> > I'm still having problems trying to build the JBoss messaging 
> module.I'm
> > getting the exception below.  There is a message at the end of the
> > exception, that leads me to believe there may be a problem with 
> nested> classes:
> > 
> >    [xdoclet] org.jboss.mq.pm.file.PersistenceManager --> TxInfo
> qualified
> > to org.jboss.mq.pm.file.TxInfo
> >    [xdoclet] org.jboss.mq.pm.rollinglogged.PersistenceManager -->
> TxInfo
> > qualified to org.jboss.mq.pm.rollinglogged.TxInfo
> > 
> > TxInfo are is a nested static class inside PersistenceManager.
> However
> > the
> > message says it is qualified to the same package,
> > org.jboss.mq.pm.file.TxInfo, not
> > org.jboss.mq.pm.file.PersistenceManager.TxInfo.  If the nested class
> is
> > moved from towards the end of the class (in both classes) to the
> > beginning,
> > the above portion of the error message goes away, but the 
> exception is
> > still thrown.  The weird thing is that there are other nested static
> > classes, but no specific error message is generated for them at any
> > point.  Is this a problem?
> > 
> > I also noticed that a double semicolon also seemed to cause xjavadoc
> > heartburn (an exception).
> > 
> > Thank you.
> > 
> > Fred.
> > 
> > compile-mbean-sources:
> >      [mkdir] Created dir:
> > D:\Multideck\JBoss3.1\jboss-all\messaging\output\gen-src
> >    [xdoclet] (ModuleFinder.findModules            112 ) Registering
> > XDoclet
> > modules (searching for jars containing META-IN
> >    [xdoclet] Running <mbeaninterface/>
> >    [xdoclet] java.lang.NullPointerException
> >    [xdoclet]     at
> > xjavadoc.SimpleParser.FieldDeclaration(SimpleParser.java:657)
> >    [xdoclet]     at
> > xjavadoc.SimpleParser.ClassBodyDeclaration(SimpleParser.java:390)
> >    [xdoclet]     at
> xjavadoc.SimpleParser.ClassBody(SimpleParser.java:287)
> >    [xdoclet]     at
> >
> xjavadoc.SimpleParser.UnmodifiedClassDeclaration
(SimpleParser.java:249)
> >    [xdoclet]     at
> > xjavadoc.SimpleParser.BlockStatement(SimpleParser.java:2768)
> >    [xdoclet]     at
> xjavadoc.SimpleParser.Block(SimpleParser.java:2659)
> >    [xdoclet]     at
> > xjavadoc.SimpleParser.Statement(SimpleParser.java:2531)
> >    [xdoclet]     at
> > xjavadoc.SimpleParser.IfStatement(SimpleParser.java:3060)
> >    [xdoclet]     at
> > xjavadoc.SimpleParser.Statement(SimpleParser.java:2566)
> >    [xdoclet]     at
> > xjavadoc.SimpleParser.Method_BlockStatement(SimpleParser.java:2824)
> >    [xdoclet]     at
> > xjavadoc.SimpleParser.Method_Block(SimpleParser.java:2714)
> >    [xdoclet]     at
> > xjavadoc.SimpleParser.MethodDeclaration(SimpleParser.java:1031)
> >    [xdoclet]     at
> > xjavadoc.SimpleParser.ClassBodyDeclaration(SimpleParser.java:371)
> >    [xdoclet]     at
> xjavadoc.SimpleParser.ClassBody(SimpleParser.java:287)
> >    [xdoclet]     at
> >
> xjavadoc.SimpleParser.UnmodifiedClassDeclaration
(SimpleParser.java:249)
> >    [xdoclet]     at
> > xjavadoc.SimpleParser.ClassDeclaration(SimpleParser.java:208)
> >    [xdoclet]     at
> > xjavadoc.SimpleParser.TypeDeclaration(SimpleParser.java:137)
> >    [xdoclet]     at
> > xjavadoc.SimpleParser.CompilationUnit(SimpleParser.java:98)
> >    [xdoclet]     at xjavadoc.SourceClass.parse(SourceClass.java:231)
> >    [xdoclet]     at xjavadoc.XJavaDoc.scanAndPut(XJavaDoc.java:630)
> >    [xdoclet]     at xjavadoc.XJavaDoc.getXClass(XJavaDoc.java:445)
> >    [xdoclet]     at
> xjavadoc.XJavaDoc.getSourceClasses(XJavaDoc.java:204)
> >    [xdoclet]     at
> xjavadoc.XJavaDoc.getSourceClasses(XJavaDoc.java:164)
> >    [xdoclet]     at
> > 
> xdoclet.TemplateSubTask.startProcessPerClass(TemplateSubTask.java:600)
>    [xdoclet]     at
> > xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:551)
> >    [xdoclet]     at
> > xdoclet.TemplateSubTask.execute(TemplateSubTask.java:489)
> >    [xdoclet]     at xdoclet.XDocletMain.start(XDocletMain.java:46)
> >    [xdoclet]     at xdoclet.DocletTask.start(DocletTask.java:347)
> >    [xdoclet]     at
> > xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:66)
> >    [xdoclet]     at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java)
> >    [xdoclet]     at org.apache.tools.ant.Task.perform(Task.java)
> >    [xdoclet]     at org.apache.tools.ant.Target.execute(Target.java)
> >    [xdoclet]     at
> org.apache.tools.ant.Target.performTasks(Target.java)
> >    [xdoclet]     at
> > org.apache.tools.ant.Project.executeTarget(Project.java)
> >    [xdoclet]     at
> > org.apache.tools.ant.Project.executeTargets(Project.java)
> >    [xdoclet]     at org.apache.tools.ant.Main.runBuild(Main.java)
> >    [xdoclet]     at org.apache.tools.ant.Main.start(Main.java)
> >    [xdoclet]     at org.apache.tools.ant.Main.main(Main.java)
> >    [xdoclet] INFO:    Some classes refer to other classes that were
> not
> > found among the sources or on the classpath.
> >    [xdoclet]          (Perhaps the referred class doesn't exist?
> Hasn't
> > been generated yet?)
> >    [xdoclet]          The referring classes do not import any the
> fully
> > qualified names of these classes.
> >    [xdoclet]          However, since no packages are imported,
> xjavadoc
> > has
> > assumed that the referred classes
> >    [xdoclet]          belong to the same package as the referring
> class.
> > The classes are:
> >    [xdoclet] org.jboss.mq.pm.file.PersistenceManager --> TxInfo
> qualified
> > to org.jboss.mq.pm.file.TxInfo
> >    [xdoclet] org.jboss.mq.pm.rollinglogged.PersistenceManager -->
> TxInfo
> > qualified to org.jboss.mq.pm.rollinglogged.TxInfo
> > 
> > BUILD FAILED
> > D:\Multideck\JBoss3.1\jboss-all\messaging\build.xml:308: Unexpected
> error
> > 
> > 
> > 
> > -------------------------------------------------------
> > Sponsored by:
> > ThinkGeek at http://www.ThinkGeek.com/
> > _______________________________________________
> > Xdoclet-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> 
> 
> 
> 
> 
> -------------------------------------------------------
> Sponsored by:
> ThinkGeek at http://www.ThinkGeek.com/
> _______________________________________________
> Xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> 



-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to