/[classpath]/gjdoc/src/gnu/classpath/tools/gjdoc/RootDocImpl.java
ViewVC logotype

Diff of /gjdoc/src/gnu/classpath/tools/gjdoc/RootDocImpl.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by julian, Tue Dec 21 13:34:33 2004 UTC revision 1.19 by julian, Tue Feb 8 01:33:11 2005 UTC
# Line 811  public class RootDocImpl Line 811  public class RootDocImpl
811        {        {
812           String topLevelName = name;           String topLevelName = name;
813           int ndx = topLevelName.indexOf('.');           int ndx = topLevelName.indexOf('.');
814           String innerClassName = null;  
815             String _innerClassName = null;
816           if (ndx > 0) {           if (ndx > 0) {
817              innerClassName = topLevelName.substring(ndx + 1);              _innerClassName = topLevelName.substring(ndx + 1);
818              topLevelName = topLevelName.substring(0, ndx);              topLevelName = topLevelName.substring(0, ndx);
819           }           }
820    
821           if (this.name.equals(topLevelName)) {           if (this.name.equals(topLevelName)) {
822              if (null == innerClassName) {              if (null == _innerClassName) {
823                 return qualifiedName;                 return qualifiedName;
824              }              }
825              else {              else {
826                 return qualifiedName + "." + innerClassName;                 return qualifiedName + "." + _innerClassName;
827              }              }
828           }           }
829           else {           else {
# Line 1026  public class RootDocImpl Line 1027  public class RootDocImpl
1027    
1028        for (Iterator it=sourcePath.iterator(); it.hasNext(); ) {        for (Iterator it=sourcePath.iterator(); it.hasNext(); ) {
1029                            
1030           File sourcePath = (File)it.next();           File _sourcePath = (File)it.next();
1031    
1032           StringBuffer packageOrClassPrefix = new StringBuffer();           StringBuffer packageOrClassPrefix = new StringBuffer();
1033           StringTokenizer st = new StringTokenizer(importSpecifier, ".");           StringTokenizer st = new StringTokenizer(importSpecifier, ".");
1034           while (st.hasMoreTokens() && sourcePath.isDirectory()) {           while (st.hasMoreTokens() && _sourcePath.isDirectory()) {
1035              String token = st.nextToken();              String token = st.nextToken();
1036              if ("*".equals(token)) {              if ("*".equals(token)) {
1037                 return new ResolvedImportPackageFile(sourcePath,                 return new ResolvedImportPackageFile(_sourcePath,
1038                                                      packageOrClassPrefix.substring(0, packageOrClassPrefix.length() - 1));                                                      packageOrClassPrefix.substring(0, packageOrClassPrefix.length() - 1));
1039              }              }
1040              else {              else {
1041                 packageOrClassPrefix.append(token);                 packageOrClassPrefix.append(token);
1042                 packageOrClassPrefix.append('.');                 packageOrClassPrefix.append('.');
1043                 File classFile = new File(sourcePath, token + ".java");                 File classFile = new File(_sourcePath, token + ".java");
1044                 //System.err.println("  looking for file " + classFile);                 //System.err.println("  looking for file " + classFile);
1045                 if (classFile.exists()) {                 if (classFile.exists()) {
1046                    StringBuffer innerClassName = new StringBuffer();                    StringBuffer innerClassName = new StringBuffer();
# Line 1053  public class RootDocImpl Line 1054  public class RootDocImpl
1054                    return new ResolvedImportClassFile(classFile, innerClassName.toString(), token, importSpecifier);                    return new ResolvedImportClassFile(classFile, innerClassName.toString(), token, importSpecifier);
1055                 }                 }
1056                 else {                 else {
1057                    sourcePath = new File(sourcePath, token);                    _sourcePath = new File(_sourcePath, token);
1058                 }                 }
1059              }              }
1060           }           }

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26