[ 
https://issues.apache.org/jira/browse/JXR-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16559367#comment-16559367
 ] 

Alina Vasiljeva commented on JXR-135:
-------------------------------------

The template for displaying the list of classes:
/maven-jxr/maven-jxr/src/main/resources/templates/allclasses-frame.vm
and it is displaying $classInfo.name.

Through 
/maven-jxr/maven-jxr/src/main/java/org/apache/maven/jxr/DirectoryIndexer.java 
it brings us to
/maven-jxr/maven-jxr/src/main/java/org/apache/maven/jxr/pacman/JavaFileImpl.java
where the source of the issue is located.

JavaFileImpl#parse method is going through the file and is simply collecting 
class names this way:
{code}
if ( ( "class".equals( stok.sval ) || "interface".equals( stok.sval ) || 
"enum".equals( stok.sval ) )
        &&  stok.ttype != '\"' )
{
        stok.nextToken();
        this.addClassType( new ClassType( stok.sval,
                getFilenameWithoutPathOrExtension( this.getPath() ) ) );
}
{code}
The problem is that it does not take into account that classes can be nested.

The potential approach for solving the issue would be to introduce a context 
while traversing th efile, stacking the info about nested classes.


> Invalid representation of inner class
> -------------------------------------
>
>                 Key: JXR-135
>                 URL: https://issues.apache.org/jira/browse/JXR-135
>             Project: Maven JXR
>          Issue Type: Bug
>            Reporter: Robert Scholte
>            Priority: Major
>
> In the list of classes, the simpleName is used. In case of an inner class, 
> the enclosing class should be added to. For comparison, javadoc uses 
> {{Map.Entry}} instead of {{Entry}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to