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

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

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

revision 1.4 by julian, Tue Dec 7 15:00:01 2004 UTC revision 1.5 by julian, Mon Dec 20 21:27:52 2004 UTC
# Line 26  import java.text.*; Line 26  import java.text.*;
26    
27  public class ThrowsTagImpl extends AbstractTagImpl implements ThrowsTag {  public class ThrowsTagImpl extends AbstractTagImpl implements ThrowsTag {
28    
29       private ClassDoc exception;
30       private String exceptionName;
31       private String exceptionComment;
32    
33     public ThrowsTagImpl(String text,     public ThrowsTagImpl(String text,
34                          ClassDocImpl contextClass,                          ClassDocImpl contextClass,
35                          MemberDocImpl contextMember) {                          MemberDocImpl contextMember) {
# Line 43  public class ThrowsTagImpl extends Abstr Line 47  public class ThrowsTagImpl extends Abstr
47              break;              break;
48           }           }
49        }        }
50        if (contextClass==null) {        if (null != exceptionName) {
51           this.exception=(ClassDocImpl)Main.getRootDoc().classNamed(exceptionName);           if (contextClass==null) {
52                this.exception=Main.getRootDoc().classNamed(exceptionName);
53             }
54             else {
55                this.exception=contextClass.findClass(exceptionName);
56             }
57             if (exception!=null)
58                this.exceptionName=exception.qualifiedName();
59             else {
60                if (text.trim().startsWith("<")) {
61                   Main.getRootDoc().printWarning("Expected exception name but got '"+text+"' in class "+contextClass.getClassName());
62                }
63             }
64        }        }
65        else {        else {
66           this.exception=(ClassDocImpl)contextClass.findClass(exceptionName);           Main.getRootDoc().printWarning("@throws tag in comment for " + contextClass.qualifiedName() + "." + contextMember.name() + " doesn't specify an exception.");
67        }        }
       if (exception!=null)  
          this.exceptionName=exception.qualifiedName();  
       else {  
          if (text.trim().startsWith("<")) {  
             Main.getRootDoc().printWarning("Expected exception name but got '"+text+"' in class "+contextClass.getClassName());  
          }  
       }  
         
68        if (this.exceptionComment!=null) {        if (this.exceptionComment!=null) {
69           setBody(this.exceptionComment, contextClass, contextMember);           setBody(this.exceptionComment, contextClass, contextMember);
70        }        }
# Line 77  public class ThrowsTagImpl extends Abstr Line 85  public class ThrowsTagImpl extends Abstr
85     public String kind() {     public String kind() {
86        return "@throws";        return "@throws";
87     }     }
   
    private ClassDocImpl exception;  
    private String       exceptionName;  
    private String       exceptionComment;  
88  }  }

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

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