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 DiskLayoutTaglet implements Taglet { 29 private String NAME = "disk_layout"; 30 private String ROWNAME = "Disk Layout"; 31 35 public String getName() { 36 return NAME; 37 } 38 39 43 public boolean inField() { 44 return false; 45 } 46 47 51 public boolean inConstructor() { 52 return false; 53 } 54 55 59 public boolean inMethod() { 60 return false; 61 } 62 63 67 public boolean inOverview() { 68 return true; 69 } 70 71 75 public boolean inPackage() { 76 return true; 77 } 78 79 83 public boolean inType() { 84 return true; 85 } 86 87 91 public boolean isInlineTag() { 92 return false; 93 } 94 95 99 public static void register(Map tagletMap) { 100 DiskLayoutTaglet tag = new DiskLayoutTaglet(); 101 Taglet t = (Taglet) tagletMap.get(tag.getName()); 102 if (t != null) { 103 tagletMap.remove(tag.getName()); 104 } 105 tagletMap.put(tag.getName(), tag); 106 } 107 108 113 public String toString(Tag tag) { 114 return "<tr><td>" + ROWNAME + "</td>" 115 + "<td>" + tag.text() + "</td></tr></table>\n"; 116 } 117 118 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 + "</table></dt>\n"; 135 } 136 } 137 138 | Popular Tags |