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 public class FormatIdTaglet implements Taglet { 28 29 private String NAME = "format_id"; 30 private String ROWNAME = "Format ID"; 31 32 36 public String getName() { 37 return NAME; 38 } 39 40 44 public boolean inField() { 45 return false; 46 } 47 48 49 53 public boolean inConstructor() { 54 return false; 55 } 56 57 61 public boolean inMethod() { 62 return false; 63 } 64 65 69 public boolean inOverview() { 70 return true; 71 } 72 73 77 public boolean inPackage() { 78 return true; 79 } 80 81 85 public boolean inType() { 86 return true; 87 } 88 89 93 public boolean isInlineTag() { 94 return false; 95 } 96 97 101 public static void register(Map tagletMap) { 102 FormatIdTaglet tag = new FormatIdTaglet(); 103 Taglet t = (Taglet) tagletMap.get(tag.getName()); 104 if (t != null) { 105 tagletMap.remove(tag.getName()); 106 } 107 tagletMap.put(tag.getName(), tag); 108 } 109 110 115 public String toString(Tag tag) { 116 return "\n<dt><table cellpadding=2 cellspacing=2><tr><td>" + ROWNAME + "</td>" 117 + "<td>" + tag.text() + "</td></tr>\n"; 118 } 119 120 124 public String toString(Tag[] tags) { 125 if (tags.length == 0) { 126 return null; 127 } 128 String result = "<table cellpadding=2 cellspacing=2><tr><td>" + ROWNAME + "</td><td>" ; 129 for (int i = 0; i < tags.length; i++) { 130 if (i > 0) { 131 result += ""; 132 } 133 result += tags[i].text() + "</td></tr>"; 134 } 135 return result + "\n"; 136 } 137 } 138 139 | Popular Tags |