1 21 package org.apache.derbyBuild.javadoc; 22 23 import com.sun.tools.doclets.Taglet; 24 import com.sun.javadoc.*; 25 import java.util.Map ; 26 27 29 public class PurposeTaglet implements Taglet { 30 31 private String NAME = "purpose"; 32 private String ROWNAME = "Purpose"; 33 34 38 public String getName() { 39 return NAME; 40 } 41 42 46 public boolean inField() { 47 return false; 48 } 49 50 54 public boolean inConstructor() { 55 return false; 56 } 57 58 62 public boolean inMethod() { 63 return false; 64 } 65 66 70 public boolean inOverview() { 71 return true; 72 } 73 74 78 public boolean inPackage() { 79 return true; 80 } 81 82 86 public boolean inType() { 87 return true; 88 } 89 90 94 public boolean isInlineTag() { 95 return false; 96 } 97 98 102 public static void register(Map tagletMap) { 103 PurposeTaglet tag = new PurposeTaglet(); 104 Taglet t = (Taglet) tagletMap.get(tag.getName()); 105 if (t != null) { 106 tagletMap.remove(tag.getName()); 107 } 108 tagletMap.put(tag.getName(), tag); 109 } 110 111 116 public String toString(Tag tag) { 117 return "<tr><td>" + ROWNAME + "</td>" 118 + "<td>" + tag.text() + "</td></tr>\n"; 119 } 120 121 125 public String toString(Tag[] tags) { 126 if (tags.length == 0) { 127 return null; 128 } 129 String result = "<tr><td>" + ROWNAME + "</td><td>"; 130 for (int i = 0; i < tags.length; i++) { 131 if (i > 0) { 132 result += ""; 133 } 134 result += tags[i].text() + "</td></tr>"; 135 } 136 return result + "\n"; 137 } 138 } 139 140 | Popular Tags |