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

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

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

revision 1.15 by julian, Mon Dec 13 17:43:37 2004 UTC revision 1.16 by julian, Tue Dec 14 13:52:45 2004 UTC
# Line 352  public class ClassDocImpl Line 352  public class ClassDocImpl
352                    }                    }
353                 }                 }
354                 else if (word.equals("extends")) {                 else if (word.equals("extends")) {
355                    item=2;                    if (rc.isInterface()) {
356                         item=3;
357                      }
358                      else {
359                         item=2;
360                      }
361                 }                 }
362                 else if (word.equals("implements")) {                 else if (word.equals("implements")) {
363                    item=3;                    item=3;
# Line 375  public class ClassDocImpl Line 380  public class ClassDocImpl
380           prev=c;           prev=c;
381        }        }
382    
383          if (null != containingClass
384              && containingClass.isInterface()) {
385             rc.accessLevel = ACCESS_PUBLIC;
386          }
387    
388        if (rc.name()==null) {        if (rc.name()==null) {
389           throw new ParseException("No classdef found in expression \""+new String(source,startIndex,endIndex-startIndex)+"\"");           throw new ParseException("No classdef found in expression \""+new String(source,startIndex,endIndex-startIndex)+"\"");
390        }        }
# Line 385  public class ClassDocImpl Line 395  public class ClassDocImpl
395           rc.setSuperclass(superclassProxy);           rc.setSuperclass(superclassProxy);
396        }        }
397    
398          /*
399        if (!rc.isInterface()) {        if (!rc.isInterface()) {
400          */
401           ClassDoc[] interfaces=new ClassDoc[implementedInterfaces.size()];           ClassDoc[] interfaces=new ClassDoc[implementedInterfaces.size()];
402           for (int i=0; i<interfaces.length; ++i) {           for (int i=0; i<interfaces.length; ++i) {
403              interfaces[i]=new ClassDocProxy((String)implementedInterfaces.get(i), rc);              interfaces[i]=new ClassDocProxy((String)implementedInterfaces.get(i), rc);
404           }           }
405           Arrays.sort(interfaces);           Arrays.sort(interfaces);
406           rc.setInterfaces(interfaces);           rc.setInterfaces(interfaces);
407             /*
408        }        }
409        else {        else {
410           if (!superclassName.equals("java.lang.Object"))           if (!superclassName.equals("java.lang.Object"))
# Line 399  public class ClassDocImpl Line 412  public class ClassDocImpl
412           else           else
413              rc.setInterfaces(new ClassDoc[0]);              rc.setInterfaces(new ClassDoc[0]);
414        }        }
415             */
416    
417        //Debug.log(9,rc.name());        //Debug.log(9,rc.name());
418    
# Line 956  public class ClassDocImpl Line 970  public class ClassDocImpl
970     {     {
971        return false;        return false;
972     }     }
973    
974       // Compares this Object with the specified Object for order.
975       public int compareTo(java.lang.Object o) {
976          int rc;
977    
978          if (o instanceof ClassDocImpl) {
979          
980             ClassDocImpl c1 = this;
981             ClassDocImpl c2 = (ClassDocImpl)o;
982    
983             if (null != c1.containingClass() && null == c2.containingClass()) {
984                rc = c1.containingClass().compareTo(c2);
985                if (0 == rc) {
986                   rc = 1;
987                }
988                return rc;
989             }
990             else if (null == c1.containingClass() && null != c2.containingClass()) {
991                rc = c1.compareTo(c2.containingClass());
992                if (0 == rc) {
993                   rc = -1;
994                }
995                return rc;
996             }
997             else if (null != c1.containingClass() && null != c2.containingClass()) {
998                rc = c1.compareTo(c2.containingClass());
999                if (0 != rc) {
1000                   return rc;
1001                }
1002             }
1003    
1004             rc = super.compareTo(o);
1005             if (0 == rc) {
1006                return Main.getInstance().getCollator().compare(containingPackage().name(),
1007                                                                ((ClassDocImpl)o).containingPackage().name());
1008             }
1009             else {
1010                return rc;
1011             }
1012          }
1013          else {
1014             return 1;
1015          }
1016       }
1017  }  }
1018    

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

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