KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derbyBuild > javadoc > EndFormatTaglet


1 /*
2
3    Derby - Class org.apache.derbyBuild.javadoc.EndFormatTaglet
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to You under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21 package org.apache.derbyBuild.javadoc;
22
23 import com.sun.tools.doclets.Taglet;
24 import com.sun.javadoc.*;
25 import java.util.Map JavaDoc;
26
27 // Adapted from ToDoTaglet.java, Copyright 2002.
28

29 public class EndFormatTaglet implements Taglet {
30     private String JavaDoc NAME = "end_format";
31     private String JavaDoc ROWNAME = "end_format";
32
33     /**
34      * Returns the name of this taglet
35      * @return NAME
36      */

37     public String JavaDoc getName() {
38         return NAME;
39     }
40
41     /**
42      * end_format not expected to be used in field documentation.
43      * @return false
44      */

45     public boolean inField() {
46         return false;
47     }
48
49     /**
50      * end_format not expected to be used in constructor documentation.
51      * @return false
52      */

53     public boolean inConstructor() {
54         return false;
55     }
56
57     /**
58      * end_format not expected to be used in method documentation.
59      * @return false
60      */

61     public boolean inMethod() {
62         return false;
63     }
64
65     /**
66      * end_format can be used in overview documentation.
67      * @return true
68      */

69     public boolean inOverview() {
70         return true;
71     }
72
73     /**
74      * end_format can be used in package documentation.
75      * @return true
76      */

77     public boolean inPackage() {
78         return true;
79     }
80
81     /**
82      * end_format can be used in type documentation.
83      * @return true
84      */

85     public boolean inType() {
86         return true;
87     }
88
89     /**
90      * end_format is not an inline tag.
91      * @return false
92      */

93     public boolean isInlineTag() {
94         return false;
95     }
96
97     /**
98      * Register this Taglet.
99      * @param tagletMap
100      */

101     public static void register(Map JavaDoc tagletMap) {
102        EndFormatTaglet tag = new EndFormatTaglet();
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     /**
111      * No-op. Not currently used.
112      * @param tag The tag to embed to the disk format table.
113      */

114     public String JavaDoc toString(Tag tag) {
115         return "";
116     }
117
118     /**
119      * No-op. Not currently used.
120      * @param tags An array of tags to add to the disk format table.
121      */

122     public String JavaDoc toString(Tag[] tags) {
123         if (tags.length == 0) {
124             return null;
125         }
126         String JavaDoc result = "";
127         for (int i = 0; i < tags.length; i++) {
128             if (i > 0) {
129                 result += "";
130             }
131             result += "";
132         }
133         return result + "\n";
134     }
135 }
136
137
Popular Tags