/[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.5 by julian, Thu Jan 16 00:00:09 2003 UTC revision 1.6 by julian, Sun Nov 21 16:48:53 2004 UTC
# Line 176  public class ClassDocImpl extends Progra Line 176  public class ClassDocImpl extends Progra
176        for (ClassDoc cdi=this; cdi!=null; cdi=(ClassDoc)cdi.superclass()) {        for (ClassDoc cdi=this; cdi!=null; cdi=(ClassDoc)cdi.superclass()) {
177           if (cdi instanceof ClassDocImpl) {           if (cdi instanceof ClassDocImpl) {
178              ClassDoc[] cdiInterfaces=(ClassDoc[])cdi.interfaces();              ClassDoc[] cdiInterfaces=(ClassDoc[])cdi.interfaces();
179              for (int i=0; i<cdiInterfaces.length; ++i) {              if (null != cdiInterfaces) {
180                 if (cdiInterfaces[i].qualifiedName().equals(name))                 for (int i=0; i<cdiInterfaces.length; ++i) {
181                    return true;                    if (cdiInterfaces[i].qualifiedName().equals(name))
182              }                       return true;
183                   }
184                }
185           }           }
186           else {           else {
187              //throw new RuntimeException("implementsInterface(\""+name+"\") failed: Not a ClassDocImpl:"+cdi);              //throw new RuntimeException("implementsInterface(\""+name+"\") failed: Not a ClassDocImpl:"+cdi);
# Line 448  public class ClassDocImpl extends Progra Line 450  public class ClassDocImpl extends Progra
450              }              }
451           }           }
452    
453           for (int i=0; i<interfaces.length; ++i) {           if (null != interfaces) {
454              if (interfaces[i] instanceof ClassDocProxy) {              for (int i=0; i<interfaces.length; ++i) {
455                 //Debug.log(9,"class "+qualifiedName()+" implements "+interfaces[i].qualifiedName());                 if (interfaces[i] instanceof ClassDocProxy) {
456                 String className=interfaces[i].qualifiedName();                    //Debug.log(9,"class "+qualifiedName()+" implements "+interfaces[i].qualifiedName());
457                 ClassDoc realClassDoc=findClass(className);                    String className=interfaces[i].qualifiedName();
458                 if (realClassDoc==null) {                    ClassDoc realClassDoc=findClass(className);
459                    /*                    if (realClassDoc==null) {
460                    if (Main.recursiveClasses) {                       /*
461                       throw new ParseException("In class '"+qualifiedName()+"': class '"+className+"' not found.");                         if (Main.recursiveClasses) {
462                    }                         throw new ParseException("In class '"+qualifiedName()+"': class '"+className+"' not found.");
463                    */                         }
464                 }                       */
465                 else {                    }
466                    //Debug.log(9,"found class '"+className+"': "+interfaces[i]);                    else {
467                    interfaces[i]=realClassDoc;                       //Debug.log(9,"found class '"+className+"': "+interfaces[i]);
468                 }                       interfaces[i]=realClassDoc;
469              }                    }
470           }                 }
471                }
472           if (fields==null) {           }
473              System.err.println("null fields in "+qualifiedName());  
474           }           if (fields!=null) {
475                for (int i=0; i<fields.length; ++i) {
476           for (int i=0; i<fields.length; ++i) {                 ((FieldDocImpl)fields[i]).resolve();
477              ((FieldDocImpl)fields[i]).resolve();                 if (fields[i].name().equals("serialPersistentField")) {
478              if (fields[i].name().equals("serialPersistentField")) {                    serialPersistentField=new FieldDoc[]{fields[i]};
479                 serialPersistentField=new FieldDoc[]{fields[i]};                    definesSerializableFields=true;
480                 definesSerializableFields=true;                 }
481              }              }
482           }           }
483    
484           for (int i=0; i<methods.length; ++i) {           if (methods!=null) {
485              ((MethodDocImpl)methods[i]).resolve();              for (int i=0; i<methods.length; ++i) {
486           }                 ((MethodDocImpl)methods[i]).resolve();
487                }
488           for (int i=0; i<constructors.length; ++i) {           }
489              ((ConstructorDocImpl)constructors[i]).resolve();  
490           }           if (constructors!=null) {
491                for (int i=0; i<constructors.length; ++i) {
492                   ((ConstructorDocImpl)constructors[i]).resolve();
493                }
494             }
495    
496           List isSerMethodList=new ArrayList();           List isSerMethodList=new ArrayList();
497    
498           for (Iterator it=maybeSerMethodList.iterator(); it.hasNext(); ) {           if (null != maybeSerMethodList) {
499              MethodDocImpl method=(MethodDocImpl)it.next();              for (Iterator it=maybeSerMethodList.iterator(); it.hasNext(); ) {
500              method.resolve();                 MethodDocImpl method=(MethodDocImpl)it.next();
501                   method.resolve();
502              if (((method.name().equals("readObject")  
503                   && method.signature().equals("(java.io.ObjectInputStream)"))                 if (((method.name().equals("readObject")
504                  || (method.name().equals("writeObject")                       && method.signature().equals("(java.io.ObjectInputStream)"))
505                      && method.signature().equals("(java.io.ObjectOutputStream)")))) {                      || (method.name().equals("writeObject")
506                            && method.signature().equals("(java.io.ObjectOutputStream)")))) {
507                 isSerMethodList.add(method);  
508              }                    isSerMethodList.add(method);
509           }                 }
510           this.serializationMethods=(MethodDoc[])isSerMethodList.toArray(new MethodDoc[0]);              }
511           maybeSerMethodList=null;              this.serializationMethods=(MethodDoc[])isSerMethodList.toArray(new MethodDoc[0]);
512                maybeSerMethodList=null;
513             }
514        }        }
515     }     }
516    
# Line 519  public class ClassDocImpl extends Progra Line 527  public class ClassDocImpl extends Progra
527    
528        super.resolveComments();        super.resolveComments();
529    
530        for (int i=0; i<fields.length; ++i) {        if (null != fields) {
531           ((FieldDocImpl)fields[i]).resolveComments();           for (int i=0; i<fields.length; ++i) {
532        }              ((FieldDocImpl)fields[i]).resolveComments();
533        for (int i=0; i<serializableFields.length; ++i) {           }
534           ((FieldDocImpl)serializableFields[i]).resolveComments();        }
535        }  
536        for (int i=0; i<methods.length; ++i) {        if (null != serializableFields) {
537           ((MethodDocImpl)methods[i]).resolveComments();           for (int i=0; i<serializableFields.length; ++i) {
538        }              ((FieldDocImpl)serializableFields[i]).resolveComments();
539        for (int i=0; i<constructors.length; ++i) {           }
540           ((ConstructorDocImpl)constructors[i]).resolveComments();        }
541          if (null != methods) {
542             for (int i=0; i<methods.length; ++i) {
543                ((MethodDocImpl)methods[i]).resolveComments();
544             }
545          }
546          if (null != constructors) {
547             for (int i=0; i<constructors.length; ++i) {
548                ((ConstructorDocImpl)constructors[i]).resolveComments();
549             }
550        }        }
551    
552        resolveTags();        resolveTags();

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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