1 22 package org.aspectj.tools.ajdoc; 23 24 import org.aspectj.ajdoc.Doc; 25 26 import com.sun.javadoc.SeeTag; 27 import com.sun.javadoc.Tag; 28 29 import java.util.Locale ; 30 31 public abstract class DocImpl 32 implements org.aspectj.ajdoc.Doc { 33 34 35 private boolean isIncluded = true; 36 37 38 private Comment comment; 39 40 41 private ErrPrinter err; 42 43 44 private boolean isInterface = true; 45 46 47 private Locale locale = Locale.US; 49 54 public Locale locale() { return locale; 56 } 57 58 59 public void setErr(ErrPrinter err) { this.err = err; } 60 public ErrPrinter err() { return ErrPrinter.instance; } 61 62 public void setComment(Comment comment) { this.comment = comment; } 63 public Comment getComment() { return comment; } 64 65 74 public int compareTo(Object other) { 75 return other instanceof Doc 76 ? Util.compareTo(this, (Doc)other) 77 : -1; 78 } 79 80 87 public Tag[] firstSentenceTags() { 88 return getComment() != null 89 ? getComment().firstSentenceTags() 90 : new Tag[0]; 91 } 92 93 98 public String getRawCommentText() { 99 return getComment() != null 100 ? getComment().rawCommentText() 101 : ""; 102 } 103 104 109 public void setRawCommentText(String rawCommentText) { 110 if (getComment() != null) { 111 getComment().setRawCommentText(rawCommentText); 112 } 113 } 114 115 120 public Tag[] inlineTags() { 121 return getComment() != null 122 ? getComment().inlineTags() 123 : new Tag[0]; 124 } 125 126 132 public SeeTag[] seeTags() { 133 return getComment() != null 134 ? getComment().seeTags() 135 : new SeeTag[0]; 136 } 137 138 144 public Tag[] tags() { 145 return getComment() != null 146 ? getComment().tags() 147 : new Tag[0]; 148 } 149 150 157 public Tag[] tags(String tagname) { 158 return getComment() != null 159 ? getComment().tags(tagname) 160 : new Tag[0]; 161 } 162 163 169 public String commentText() { 170 return getComment() != null 171 ? getComment().commentText() 172 : ""; 173 } 174 175 180 public void setIncluded(boolean isIncluded) { 181 this.isIncluded = isIncluded; 182 } 183 184 189 public boolean isClass() { 190 return false; 191 } 192 193 198 public boolean isConstructor() { 199 return false; 200 } 201 202 207 public boolean isError() { 208 return false; 209 } 210 211 216 public boolean isException() { 217 return false; 218 } 219 224 public boolean isField() { 225 return false; 226 } 227 232 public boolean isIncluded() { 233 return isIncluded; 234 } 235 236 241 public boolean isInterface() { 242 return false; 243 } 244 245 250 public boolean isMethod() { 251 return false; 252 } 253 254 259 public boolean isOrdinaryClass() { 260 return false; 261 } 262 263 268 public boolean isPointcut() { 269 return false; 270 } 271 272 277 public boolean isAdvice() { 278 return false; 279 } 280 } 281 | Popular Tags |