src/share/classes/com/sun/tools/javadoc/ThrowsTagImpl.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
40 */ 40 */
41 class ThrowsTagImpl extends TagImpl implements ThrowsTag { 41 class ThrowsTagImpl extends TagImpl implements ThrowsTag {
42 42
43 private final String exceptionName; 43 private final String exceptionName;
44 private final String exceptionComment; 44 private final String exceptionComment;
45
46 /**
47 * Cached inline tags.
48 */
49 private Tag[] inlineTags;
45 50
46 ThrowsTagImpl(DocImpl holder, String name, String text) { 51 ThrowsTagImpl(DocImpl holder, String name, String text) {
47 super(holder, name, text); 52 super(holder, name, text);
48 String[] sa = divideAtWhite(); 53 String[] sa = divideAtWhite();
49 exceptionName = sa[0]; 54 exceptionName = sa[0];
91 96
92 /** 97 /**
93 * Return the kind of this tag. Always "@throws" for instances 98 * Return the kind of this tag. Always "@throws" for instances
94 * of ThrowsTagImpl. 99 * of ThrowsTagImpl.
95 */ 100 */
101 @Override
96 public String kind() { 102 public String kind() {
97 return "@throws"; 103 return "@throws";
98 } 104 }
99 105
100 /** 106 /**
103 * 109 *
104 * @return TagImpl[] Array of tags with inline SeeTagImpls. 110 * @return TagImpl[] Array of tags with inline SeeTagImpls.
105 * @see TagImpl#inlineTagImpls() 111 * @see TagImpl#inlineTagImpls()
106 * @see ParamTagImpl#inlineTagImpls() 112 * @see ParamTagImpl#inlineTagImpls()
107 */ 113 */
114 @Override
108 public Tag[] inlineTags() { 115 public Tag[] inlineTags() {
109 return Comment.getInlineTags(holder, exceptionComment()); 116 if (inlineTags == null) {
117 inlineTags = Comment.getInlineTags(holder, exceptionComment());
118 }
119 return inlineTags;
110 } 120 }
111 } 121 }

mercurial