KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > aspectj > tools > ajdoc > ParamTagImpl


1 /* -*- Mode: JDE; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2  *
3  * This file is part of the debugger and core tools for the AspectJ(tm)
4  * programming language; see http://aspectj.org
5  *
6  * The contents of this file are subject to the Mozilla Public License
7  * Version 1.1 (the "License"); you may not use this file except in
8  * compliance with the License. You may obtain a copy of the License at
9  * either http://www.mozilla.org/MPL/ or http://aspectj.org/MPL/.
10  *
11  * Software distributed under the License is distributed on an "AS IS" basis,
12  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13  * for the specific language governing rights and limitations under the
14  * License.
15  *
16  * The Original Code is AspectJ.
17  *
18  * The Initial Developer of the Original Code is Xerox Corporation. Portions
19  * created by Xerox Corporation are Copyright (C) 1999-2002 Xerox Corporation.
20  * All Rights Reserved.
21  */

22 package org.aspectj.tools.ajdoc;
23
24 import com.sun.javadoc.Doc;
25 import com.sun.javadoc.ParamTag;
26
27 import java.util.Locale JavaDoc;
28
29 /**
30  * The implementation of a param tag.
31  *
32  * @author Jeff Palm
33  */

34 public class ParamTagImpl extends TagImpl implements ParamTag {
35
36     private String JavaDoc parameterComment;
37     private String JavaDoc parameterName;
38
39     /**
40      * Constructs the new tag with given parameters.
41      *
42      * @param doc the new value for <code>doc</code>.
43      * @param name the new value for <code>name</code>.
44      * @param text the new value for <code>text</code>.
45      * @param locale the new value for <code>locale</code>.
46      * @param err the new value for <code>err</code>.
47      */

48     public ParamTagImpl(Doc doc,
49                         String JavaDoc name,
50                         String JavaDoc text,
51                         Locale JavaDoc loc,
52                         ErrPrinter err) {
53         super(doc, name, null, loc, err);
54         String JavaDoc[] split = split(text);
55         parameterName = split[0];
56         parameterComment = split[1];
57         setText(parameterComment);
58     }
59
60     /**
61      * Returns the parameter comment.
62      *
63      * @return the parameter comment.
64      */

65     public String JavaDoc parameterComment() {
66         return parameterComment;
67     }
68
69     /**
70      * Returns the name of the parameter.
71      *
72      * @return the name of the parameter.
73      */

74     public String JavaDoc parameterName() {
75         return parameterName;
76     }
77
78     /**
79      * Returns <code>param</code>.
80      *
81      * @return <code>param</code>.
82      */

83     public String JavaDoc kind() {
84         return "@param";
85     }
86 }
87
Popular Tags