1 21 22 package org.apache.derbyBuild.javadoc; 23 24 import com.sun.tools.doclets.Taglet; 25 import com.sun.javadoc.*; 26 import java.util.Map ; 27 28 public class UpgradeTaglet implements Taglet { 29 private String NAME = "upgrade"; 30 private String ROWNAME = "Upgrade"; 31 32 36 public String getName() { 37 return NAME; 38 } 39 40 44 public boolean inField() { 45 return false; 46 } 47 48 52 public boolean inConstructor() { 53 return false; 54 } 55 56 60 public boolean inMethod() { 61 return false; 62 } 63 64 68 public boolean inOverview() { 69 return true; 70 } 71 72 76 public boolean inPackage() { 77 return true; 78 } 79 80 84 public boolean inType() { 85 return true; 86 } 87 88 92 public boolean isInlineTag() { 93 return false; 94 } 95 96 100 public static void register(Map tagletMap) { 101 UpgradeTaglet tag = new UpgradeTaglet(); 102 Taglet t = (Taglet) tagletMap.get(tag.getName()); 103 if (t != null) { 104 tagletMap.remove(tag.getName()); 105 } 106 tagletMap.put(tag.getName(), tag); 107 } 108 109 114 public String toString(Tag tag) { 115 return "<tr><td>" + ROWNAME + "</td>" 116 + "<td>" + tag.text() + "</td></tr>\n"; 117 } 118 119 123 public String toString(Tag[] tags) { 124 if (tags.length == 0) { 125 return null; 126 } 127 String result = "<tr><td>" + ROWNAME + "</td><td>"; 128 for (int i = 0; i < tags.length; i++) { 129 if (i > 0) { 130 result += ""; 131 } 132 result += tags[i].text() + "</td></tr>"; 133 } 134 return result + "\n"; 135 } 136 } 137 138 | Popular Tags |