src/share/classes/com/sun/tools/javadoc/ParamTagImpl.java

changeset 1053
0d8edba73d70
parent 554
9d9f26857129
child 1358
fc123bdeddb8
equal deleted inserted replaced
1052:409b104f8b86 1053:0d8edba73d70
1 /* 1 /*
2 * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
42 42
43 private final String parameterName; 43 private final String parameterName;
44 private final String parameterComment; 44 private final String parameterComment;
45 private final boolean isTypeParameter; 45 private final boolean isTypeParameter;
46 46
47 /**
48 * Cached inline tags.
49 */
50 private Tag[] inlineTags;
51
47 ParamTagImpl(DocImpl holder, String name, String text) { 52 ParamTagImpl(DocImpl holder, String name, String text) {
48 super(holder, name, text); 53 super(holder, name, text);
49 String[] sa = divideAtWhite(); 54 String[] sa = divideAtWhite();
50 55
51 Matcher m = typeParamRE.matcher(sa[0]); 56 Matcher m = typeParamRE.matcher(sa[0]);
69 } 74 }
70 75
71 /** 76 /**
72 * Return the kind of this tag. 77 * Return the kind of this tag.
73 */ 78 */
79 @Override
74 public String kind() { 80 public String kind() {
75 return "@param"; 81 return "@param";
76 } 82 }
77 83
78 /** 84 /**
83 } 89 }
84 90
85 /** 91 /**
86 * convert this object to a string. 92 * convert this object to a string.
87 */ 93 */
94 @Override
88 public String toString() { 95 public String toString() {
89 return name + ":" + text; 96 return name + ":" + text;
90 } 97 }
91 98
92 /** 99 /**
95 * 102 *
96 * @return TagImpl[] Array of tags with inline SeeTagImpls. 103 * @return TagImpl[] Array of tags with inline SeeTagImpls.
97 * @see TagImpl#inlineTagImpls() 104 * @see TagImpl#inlineTagImpls()
98 * @see ThrowsTagImpl#inlineTagImpls() 105 * @see ThrowsTagImpl#inlineTagImpls()
99 */ 106 */
107 @Override
100 public Tag[] inlineTags() { 108 public Tag[] inlineTags() {
101 return Comment.getInlineTags(holder, parameterComment); 109 if (inlineTags == null) {
110 inlineTags = Comment.getInlineTags(holder, parameterComment);
111 }
112 return inlineTags;
102 } 113 }
103 } 114 }

mercurial