1 22 package org.aspectj.tools.ajdoc; 23 24 import com.sun.javadoc.Doc; 25 import com.sun.javadoc.Tag; 26 27 import java.util.Locale ; 28 29 public class TagImpl implements Tag { 30 31 private Locale locale; 32 private ErrPrinter err; 33 private String name; 34 private String text; 35 private Doc doc; 36 37 46 public TagImpl(Doc doc, 47 String name, 48 String text, 49 Locale locale, 50 ErrPrinter err) { 51 this.doc = doc; 52 this.name = name; 53 this.text = text; 54 this.locale = locale; 55 this.err = err; 56 } 57 58 63 protected final Doc doc() { 64 return doc; 65 } 66 67 72 protected final ErrPrinter err() { 73 return err == null ? ErrPrinter.instance : err; 74 } 75 76 81 protected final static boolean start(char c) { return Util.start(c); } 82 83 88 protected final static boolean ident(char c) { return Util.ident(c); } 89 90 95 protected final static boolean space(char c) { return Util.space(c); } 96 97 102 protected final static String [] split(String s) { return Util.split(s); } 103 104 109 public String name() { 110 return name; 111 } 112 113 118 public String toString() { 119 return kind() + " " + text; 120 } 121 122 127 public String kind() { 128 return name; 129 } 130 131 136 public String text() { 137 return text; 138 } 139 140 145 protected void setText(String text) { 146 this.text = text; 147 } 148 149 154 public Locale locale() { 155 return locale; 156 } 157 158 165 public Tag[] inlineTags() { 166 return Util.inlineTags(doc(), text(), locale(), err()); } 168 169 176 public Tag[] firstSentenceTags() { 177 return Util.firstSentenceTags(doc(), text(), locale(), err()); 178 } 179 180 181 } 182 | Popular Tags |