You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ParamTagImpl.java 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. import com.sun.javadoc.Doc;
  24. import com.sun.javadoc.ParamTag;
  25. import java.util.Locale;
  26. /**
  27. * The implementation of a param tag.
  28. *
  29. * @author Jeff Palm
  30. */
  31. public class ParamTagImpl extends TagImpl implements ParamTag {
  32. private String parameterComment;
  33. private String parameterName;
  34. /**
  35. * Constructs the new tag with given parameters.
  36. *
  37. * @param doc the new value for <code>doc</code>.
  38. * @param name the new value for <code>name</code>.
  39. * @param text the new value for <code>text</code>.
  40. * @param locale the new value for <code>locale</code>.
  41. * @param err the new value for <code>err</code>.
  42. */
  43. public ParamTagImpl(Doc doc,
  44. String name,
  45. String text,
  46. Locale loc,
  47. ErrPrinter err) {
  48. super(doc, name, null, loc, err);
  49. String[] split = split(text);
  50. parameterName = split[0];
  51. parameterComment = split[1];
  52. setText(parameterComment);
  53. }
  54. /**
  55. * Returns the parameter comment.
  56. *
  57. * @return the parameter comment.
  58. */
  59. public String parameterComment() {
  60. return parameterComment;
  61. }
  62. /**
  63. * Returns the name of the parameter.
  64. *
  65. * @return the name of the parameter.
  66. */
  67. public String parameterName() {
  68. return parameterName;
  69. }
  70. /**
  71. * Returns <code>param</code>.
  72. *
  73. * @return <code>param</code>.
  74. */
  75. public String kind() {
  76. return "@param";
  77. }
  78. }