Project Report: fawkez

Packagesummary org.jcoderz.phoenix.javadoc

org.jcoderz.phoenix.javadoc.JcoderzTaglet

LineHitsNoteSource
1  /*
2   * $Id: JcoderzTaglet.java 1011 2008-06-16 17:57:36Z amandel $
3   *
4   * Copyright 2006, The jCoderZ.org Project. All rights reserved.
5   *
6   * Redistribution and use in source and binary forms, with or without
7   * modification, are permitted provided that the following conditions are
8   * met:
9   *
10   *    * Redistributions of source code must retain the above copyright
11   *      notice, this list of conditions and the following disclaimer.
12   *    * Redistributions in binary form must reproduce the above
13   *      copyright notice, this list of conditions and the following
14   *      disclaimer in the documentation and/or other materials
15   *      provided with the distribution.
16   *    * Neither the name of the jCoderZ.org Project nor the names of
17   *      its contributors may be used to endorse or promote products
18   *      derived from this software without specific prior written
19   *      permission.
20   *
21   * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND
22   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24   * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS
25   * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26   * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27   * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
28   * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29   * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
30   * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31   * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32   */
33  package org.jcoderz.phoenix.javadoc;
34  
35  import java.util.Map;
36  
37  import com.sun.javadoc.Tag;
38  import com.sun.tools.doclets.Taglet;
39  
40  /**
41   * @author Michael Rumpf
42   */
430 public class JcoderzTaglet
44     implements Taglet
45  {
460    private static final String[] TAGS = new String[]
47        {"ejb.interface-method",
48         "ejb.create-method",
49         "ejb.data-object",
50         "ejb.ejb-ref",
51         "ejb.ejb-external-ref",
52         "ejb.bean",
53         "ejb.create-method",
54         "ejb.data-object",
55         "ejb.ejb-ref",
56         "ejb.finder",
57         "ejb.interface",
58         "ejb.interface-method",
59         "ejb.permission",
60         "ejb.persistent-field",
61         "ejb.pk",
62         "ejb.pk-field",
63         "ejb.transaction",
64         "ejb.persistent-field",
65         "ejb.security-role-ref",
66         "ejb.security-roles",
67         "ejb.dao",
68         "ejb.resource-ref",
69         "ejb.persistence",
70         "jcoderz.admintool.sampleOutput",
71         "jcoderz.admintool.example",
72         "jcoderz.admintool.optional_param",
73         "jcoderz.concurrency-control",
74         "jcoderz.dbms-column",
75         "jcoderz.dbms-table",
76         "jcoderz.ds-jndi-name",
77         "jcoderz.finder-method",
78         "jsp.attribute",
79         "jsp.tag",
80         "web.ejb-ref",
81         "web.servlet",
82         "web.servlet-mapping",
83         "web.servlet-init-param",
84         "web.env-entry",
85         "web.security-role",
86         "weblogic.data-source-name",
87         "weblogic.enable-call-by-reference",
88         "weblogic.persistence",
89         "weblogic.cache",
90         "weblogic.delay-database-insert-until",
91         "weblogic.automatic-key-generation",
92         "weblogic.transaction",
93         "weblogic.resource-description",
94         "weblogic.transaction-descriptor",
95         "weblogic.dbms-column-type",
96         "description",
97         "solution",
98         "procedure",
99         "verification",
100         "@annotation"};
101  
102     /**
103      * Register this Taglet.
104      *
105      * @param tagletMap the map to register this tag to.
106      */
107     public static void register (Map tagletMap)
108     {
1090      final JcoderzTaglet tag = new JcoderzTaglet();
110  
111       // loop through the tags
1120      for (int i = 0; i < TAGS.length; i++)
113       {
1140         final Taglet t = (Taglet) tagletMap.get(TAGS[i]);
1150         if (t != null)
116          {
1170            tagletMap.remove(TAGS[i]);
118          }
1190         tagletMap.put(TAGS[i], tag);
120        }
1210    }
122  
123     /**
124      * The name of the taglet.
125      * @return The name of the taglet.
126      */
127     public String getName ()
128     {
1290       return "jCoderZ Javadoc 1.4.x Fix";
130     }
131  
132     /**
133      * Will return true since xdoclet
134      * can be used in field documentation.
135      *
136      * @return true since xdoclet tags
137      * can be used in field documentation and false
138      * otherwise.
139      */
140     public boolean inField ()
141     {
1420       return true;
143     }
144  
145     /**
146      * Will return true since xdoclet tag
147      * can be used in constructor documentation.
148      *
149      * @return true since xdoclet tag
150      * can be used in constructor documentation and false
151      * otherwise.
152      */
153     public boolean inConstructor ()
154     {
1550       return true;
156     }
157  
158     /**
159      * Will return true since xdoclet tag
160      * can be used in method documentation.
161      *
162      * @return true since xdoclet tag
163      * can be used in method documentation and false
164      * otherwise.
165      */
166     public boolean inMethod ()
167     {
1680       return true;
169     }
170  
171     /**
172      * Will return true since xdoclet tag
173      * can be used in method documentation.
174      *
175      * @return true since xdoclet tag
176      * can be used in overview documentation and false
177      * otherwise.
178      */
179     public boolean inOverview ()
180     {
1810       return true;
182     }
183  
184     /**
185      * Will return true since xdoclet tag
186      * can be used in package documentation.
187      *
188      * @return true since xdoclet tag
189      * can be used in package documentation and false
190      * otherwise.
191      */
192     public boolean inPackage ()
193     {
1940        return true;
195     }
196  
197     /**
198      * Will return true since xdoclet tag
199      * can be used in type documentation (classes or interfaces).
200      *
201      * @return true since xdoclet tag
202      * can be used in type documentation and false
203      * otherwise.
204      */
205     public boolean inType ()
206     {
2070        return true;
208     }
209  
210     /**
211      * Will return false since xdoclet tags are not
212      * inline tags.
213      *
214      * @return false since xdoclet tags
215      * are not inline tags.
216      */
217     public boolean isInlineTag ()
218     {
2190        return false;
220     }
221  
222     /**
223      * Return empty string as the tags should not be shown in Javadoc.
224      * @param tag the doclet tag encountered
225      * @return empty string.
226      */
227     public String toString (Tag tag)
228     {
2290       return "";
230     }
231  
232     /**
233      * Return empty string as the tags should not be shown in Javadoc.
234      * @param tags the doclet tags encountered
235      * @return empty string.
236      */
237      public String toString (Tag[] tags)
238      {
2390         return "";
240      }
241  }
242  

Findings in this File