author | pmuthuswamy |
Mon, 12 Nov 2018 13:31:41 +0530 | |
changeset 52487 | 5d1d07b72f15 |
parent 48028 | 9e022f580a9d |
child 57723 | 54a04db114d8 |
permissions | -rw-r--r-- |
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
1 |
/* |
46184
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
42831
diff
changeset
|
2 |
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. |
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
4 |
* |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. Oracle designates this |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
10 |
* |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
15 |
* accompanied this code). |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
16 |
* |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
20 |
* |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
22 |
* or visit www.oracle.com if you need additional information or have any |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
23 |
* questions. |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
24 |
*/ |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
25 |
|
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
26 |
package com.sun.source.util; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
27 |
|
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
28 |
import com.sun.source.doctree.*; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
29 |
|
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
30 |
|
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
31 |
/** |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
32 |
* A TreeVisitor that visits all the child tree nodes. |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
33 |
* To visit nodes of a particular type, just override the |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
34 |
* corresponding visitXYZ method. |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
35 |
* Inside your method, call super.visitXYZ to visit descendant |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
36 |
* nodes. |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
37 |
* |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
38 |
* <p>The default implementation of the visitXYZ methods will determine |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
39 |
* a result as follows: |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
40 |
* <ul> |
25287 | 41 |
* <li>If the node being visited has no children, the result will be {@code null}. |
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
42 |
* <li>If the node being visited has one child, the result will be the |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
43 |
* result of calling {@code scan} on that child. The child may be a simple node |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
44 |
* or itself a list of nodes. |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
45 |
* <li> If the node being visited has more than one child, the result will |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
46 |
* be determined by calling {@code scan} each child in turn, and then combining the |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
47 |
* result of each scan after the first with the cumulative result |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
48 |
* so far, as determined by the {@link #reduce} method. Each child may be either |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
49 |
* a simple node of a list of nodes. The default behavior of the {@code reduce} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
50 |
* method is such that the result of the visitXYZ method will be the result of |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
51 |
* the last child scanned. |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
52 |
* </ul> |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
53 |
* |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
54 |
* <p>Here is an example to count the number of erroneous nodes in a tree: |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
55 |
* <pre> |
16559 | 56 |
* class CountErrors extends DocTreeScanner<Integer,Void> { |
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
57 |
* {@literal @}Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
58 |
* public Integer visitErroneous(ErroneousTree node, Void p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
59 |
* return 1; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
60 |
* } |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
61 |
* {@literal @}Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
62 |
* public Integer reduce(Integer r1, Integer r2) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
63 |
* return (r1 == null ? 0 : r1) + (r2 == null ? 0 : r2); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
64 |
* } |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
65 |
* } |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
66 |
* </pre> |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
67 |
* |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
68 |
* @since 1.8 |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
69 |
*/ |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
70 |
public class DocTreeScanner<R,P> implements DocTreeVisitor<R,P> { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
71 |
|
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
72 |
/** |
25287 | 73 |
* Scans a single node. |
74 |
* @param node the node to be scanned |
|
75 |
* @param p a parameter value passed to the visit method |
|
76 |
* @return the result value from the visit method |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
77 |
*/ |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
78 |
public R scan(DocTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
79 |
return (node == null) ? null : node.accept(this, p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
80 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
81 |
|
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
82 |
private R scanAndReduce(DocTree node, P p, R r) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
83 |
return reduce(scan(node, p), r); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
84 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
85 |
|
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
86 |
/** |
25287 | 87 |
* Scans a sequence of nodes. |
88 |
* @param nodes the nodes to be scanned |
|
89 |
* @param p a parameter value to be passed to the visit method for each node |
|
90 |
* @return the combined return value from the visit methods. |
|
91 |
* The values are combined using the {@link #reduce reduce} method. |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
92 |
*/ |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
93 |
public R scan(Iterable<? extends DocTree> nodes, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
94 |
R r = null; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
95 |
if (nodes != null) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
96 |
boolean first = true; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
97 |
for (DocTree node : nodes) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
98 |
r = (first ? scan(node, p) : scanAndReduce(node, p, r)); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
99 |
first = false; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
100 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
101 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
102 |
return r; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
103 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
104 |
|
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
105 |
private R scanAndReduce(Iterable<? extends DocTree> nodes, P p, R r) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
106 |
return reduce(scan(nodes, p), r); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
107 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
108 |
|
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
109 |
/** |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
110 |
* Reduces two results into a combined result. |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
111 |
* The default implementation is to return the first parameter. |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
112 |
* The general contract of the method is that it may take any action whatsoever. |
25287 | 113 |
* @param r1 the first of the values to be combined |
114 |
* @param r2 the second of the values to be combined |
|
115 |
* @return the result of combining the two parameters |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
116 |
*/ |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
117 |
public R reduce(R r1, R r2) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
118 |
return r1; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
119 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
120 |
|
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
121 |
|
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
122 |
/* *************************************************************************** |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
123 |
* Visitor methods |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
124 |
****************************************************************************/ |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
125 |
|
25287 | 126 |
/** |
127 |
* {@inheritDoc} This implementation returns {@code null}. |
|
128 |
* |
|
129 |
* @param node {@inheritDoc} |
|
130 |
* @param p {@inheritDoc} |
|
131 |
* @return the result of scanning |
|
132 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
133 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
134 |
public R visitAttribute(AttributeTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
135 |
return null; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
136 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
137 |
|
25287 | 138 |
/** |
139 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
140 |
* |
|
141 |
* @param node {@inheritDoc} |
|
142 |
* @param p {@inheritDoc} |
|
143 |
* @return the result of scanning |
|
144 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
145 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
146 |
public R visitAuthor(AuthorTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
147 |
return scan(node.getName(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
148 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
149 |
|
25287 | 150 |
/** |
151 |
* {@inheritDoc} This implementation returns {@code null}. |
|
152 |
* |
|
153 |
* @param node {@inheritDoc} |
|
154 |
* @param p {@inheritDoc} |
|
155 |
* @return the result of scanning |
|
156 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
157 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
158 |
public R visitComment(CommentTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
159 |
return null; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
160 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
161 |
|
25287 | 162 |
/** |
163 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
164 |
* |
|
165 |
* @param node {@inheritDoc} |
|
166 |
* @param p {@inheritDoc} |
|
167 |
* @return the result of scanning |
|
168 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
169 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
170 |
public R visitDeprecated(DeprecatedTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
171 |
return scan(node.getBody(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
172 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
173 |
|
25287 | 174 |
/** |
175 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
176 |
* |
|
177 |
* @param node {@inheritDoc} |
|
178 |
* @param p {@inheritDoc} |
|
179 |
* @return the result of scanning |
|
180 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
181 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
182 |
public R visitDocComment(DocCommentTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
183 |
R r = scan(node.getFirstSentence(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
184 |
r = scanAndReduce(node.getBody(), p, r); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
185 |
r = scanAndReduce(node.getBlockTags(), p, r); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
186 |
return r; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
187 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
188 |
|
25287 | 189 |
/** |
190 |
* {@inheritDoc} This implementation returns {@code null}. |
|
191 |
* |
|
192 |
* @param node {@inheritDoc} |
|
193 |
* @param p {@inheritDoc} |
|
194 |
* @return the result of scanning |
|
195 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
196 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
197 |
public R visitDocRoot(DocRootTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
198 |
return null; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
199 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
200 |
|
25287 | 201 |
/** |
202 |
* {@inheritDoc} This implementation returns {@code null}. |
|
203 |
* |
|
204 |
* @param node {@inheritDoc} |
|
205 |
* @param p {@inheritDoc} |
|
206 |
* @return the result of scanning |
|
207 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
208 |
@Override |
48028
9e022f580a9d
8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents:
47216
diff
changeset
|
209 |
public R visitDocType(DocTypeTree node, P p) { |
9e022f580a9d
8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents:
47216
diff
changeset
|
210 |
return null; |
9e022f580a9d
8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents:
47216
diff
changeset
|
211 |
} |
9e022f580a9d
8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents:
47216
diff
changeset
|
212 |
|
9e022f580a9d
8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents:
47216
diff
changeset
|
213 |
/** |
9e022f580a9d
8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents:
47216
diff
changeset
|
214 |
* {@inheritDoc} This implementation returns {@code null}. |
9e022f580a9d
8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents:
47216
diff
changeset
|
215 |
* |
9e022f580a9d
8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents:
47216
diff
changeset
|
216 |
* @param node {@inheritDoc} |
9e022f580a9d
8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents:
47216
diff
changeset
|
217 |
* @param p {@inheritDoc} |
9e022f580a9d
8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents:
47216
diff
changeset
|
218 |
* @return the result of scanning |
9e022f580a9d
8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents:
47216
diff
changeset
|
219 |
*/ |
9e022f580a9d
8190552: Augment the Compiler API tree with APIs to represent HTML content
ksrini
parents:
47216
diff
changeset
|
220 |
@Override |
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
221 |
public R visitEndElement(EndElementTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
222 |
return null; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
223 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
224 |
|
25287 | 225 |
/** |
226 |
* {@inheritDoc} This implementation returns {@code null}. |
|
227 |
* |
|
228 |
* @param node {@inheritDoc} |
|
229 |
* @param p {@inheritDoc} |
|
230 |
* @return the result of scanning |
|
231 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
232 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
233 |
public R visitEntity(EntityTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
234 |
return null; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
235 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
236 |
|
25287 | 237 |
/** |
238 |
* {@inheritDoc} This implementation returns {@code null}. |
|
239 |
* |
|
240 |
* @param node {@inheritDoc} |
|
241 |
* @param p {@inheritDoc} |
|
242 |
* @return the result of scanning |
|
243 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
244 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
245 |
public R visitErroneous(ErroneousTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
246 |
return null; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
247 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
248 |
|
25287 | 249 |
/** |
37009
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
34916
diff
changeset
|
250 |
* {@inheritDoc} This implementation scans the children in left to right order. |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
34916
diff
changeset
|
251 |
* |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
34916
diff
changeset
|
252 |
* @param node {@inheritDoc} |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
34916
diff
changeset
|
253 |
* @param p {@inheritDoc} |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
34916
diff
changeset
|
254 |
* @return the result of scanning |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
34916
diff
changeset
|
255 |
*/ |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
34916
diff
changeset
|
256 |
@Override |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
34916
diff
changeset
|
257 |
public R visitHidden(HiddenTree node, P p) { |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
34916
diff
changeset
|
258 |
return scan(node.getBody(), p); |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
34916
diff
changeset
|
259 |
} |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
34916
diff
changeset
|
260 |
|
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
34916
diff
changeset
|
261 |
/** |
25287 | 262 |
* {@inheritDoc} This implementation returns {@code null}. |
263 |
* |
|
264 |
* @param node {@inheritDoc} |
|
265 |
* @param p {@inheritDoc} |
|
266 |
* @return the result of scanning |
|
267 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
268 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
269 |
public R visitIdentifier(IdentifierTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
270 |
return null; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
271 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
272 |
|
25287 | 273 |
/** |
274 |
* {@inheritDoc} This implementation returns {@code null}. |
|
275 |
* |
|
276 |
* @param node {@inheritDoc} |
|
277 |
* @param p {@inheritDoc} |
|
278 |
* @return the result of scanning |
|
279 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
280 |
@Override |
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
25874
diff
changeset
|
281 |
public R visitIndex(IndexTree node, P p) { |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
25874
diff
changeset
|
282 |
R r = scan(node.getSearchTerm(), p); |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
25874
diff
changeset
|
283 |
r = scanAndReduce(node.getDescription(), p, r); |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
25874
diff
changeset
|
284 |
return r; |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
25874
diff
changeset
|
285 |
} |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
25874
diff
changeset
|
286 |
|
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
25874
diff
changeset
|
287 |
/** |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
25874
diff
changeset
|
288 |
* {@inheritDoc} This implementation returns {@code null}. |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
25874
diff
changeset
|
289 |
* |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
25874
diff
changeset
|
290 |
* @param node {@inheritDoc} |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
25874
diff
changeset
|
291 |
* @param p {@inheritDoc} |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
25874
diff
changeset
|
292 |
* @return the result of scanning |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
25874
diff
changeset
|
293 |
*/ |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
25874
diff
changeset
|
294 |
@Override |
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
295 |
public R visitInheritDoc(InheritDocTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
296 |
return null; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
297 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
298 |
|
25287 | 299 |
/** |
300 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
301 |
* |
|
302 |
* @param node {@inheritDoc} |
|
303 |
* @param p {@inheritDoc} |
|
304 |
* @return the result of scanning |
|
305 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
306 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
307 |
public R visitLink(LinkTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
308 |
R r = scan(node.getReference(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
309 |
r = scanAndReduce(node.getLabel(), p, r); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
310 |
return r; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
311 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
312 |
|
25287 | 313 |
/** |
314 |
* {@inheritDoc} This implementation returns {@code null}. |
|
315 |
* |
|
316 |
* @param node {@inheritDoc} |
|
317 |
* @param p {@inheritDoc} |
|
318 |
* @return the result of scanning |
|
319 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
320 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
321 |
public R visitLiteral(LiteralTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
322 |
return null; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
323 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
324 |
|
25287 | 325 |
/** |
326 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
327 |
* |
|
328 |
* @param node {@inheritDoc} |
|
329 |
* @param p {@inheritDoc} |
|
330 |
* @return the result of scanning |
|
331 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
332 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
333 |
public R visitParam(ParamTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
334 |
R r = scan(node.getName(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
335 |
r = scanAndReduce(node.getDescription(), p, r); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
336 |
return r; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
337 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
338 |
|
25287 | 339 |
/** |
42831
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
340 |
* {@inheritDoc} This implementation scans the children in left to right order. |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
341 |
* |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
342 |
* @param node {@inheritDoc} |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
343 |
* @param p {@inheritDoc} |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
344 |
* @return the result of scanning |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
345 |
*/ |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
346 |
@Override |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
347 |
public R visitProvides(ProvidesTree node, P p) { |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
348 |
R r = scan(node.getServiceType(), p); |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
349 |
r = scanAndReduce(node.getDescription(), p, r); |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
350 |
return r; |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
351 |
} |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
352 |
|
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
353 |
/** |
25287 | 354 |
* {@inheritDoc} This implementation returns {@code null}. |
355 |
* |
|
356 |
* @param node {@inheritDoc} |
|
357 |
* @param p {@inheritDoc} |
|
358 |
* @return the result of scanning |
|
359 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
360 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
361 |
public R visitReference(ReferenceTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
362 |
return null; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
363 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
364 |
|
25287 | 365 |
/** |
366 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
367 |
* |
|
368 |
* @param node {@inheritDoc} |
|
369 |
* @param p {@inheritDoc} |
|
370 |
* @return the result of scanning |
|
371 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
372 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
373 |
public R visitReturn(ReturnTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
374 |
return scan(node.getDescription(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
375 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
376 |
|
25287 | 377 |
/** |
378 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
379 |
* |
|
380 |
* @param node {@inheritDoc} |
|
381 |
* @param p {@inheritDoc} |
|
382 |
* @return the result of scanning |
|
383 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
384 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
385 |
public R visitSee(SeeTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
386 |
return scan(node.getReference(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
387 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
388 |
|
25287 | 389 |
/** |
390 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
391 |
* |
|
392 |
* @param node {@inheritDoc} |
|
393 |
* @param p {@inheritDoc} |
|
394 |
* @return the result of scanning |
|
395 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
396 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
397 |
public R visitSerial(SerialTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
398 |
return scan(node.getDescription(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
399 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
400 |
|
25287 | 401 |
/** |
402 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
403 |
* |
|
404 |
* @param node {@inheritDoc} |
|
405 |
* @param p {@inheritDoc} |
|
406 |
* @return the result of scanning |
|
407 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
408 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
409 |
public R visitSerialData(SerialDataTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
410 |
return scan(node.getDescription(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
411 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
412 |
|
25287 | 413 |
/** |
414 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
415 |
* |
|
416 |
* @param node {@inheritDoc} |
|
417 |
* @param p {@inheritDoc} |
|
418 |
* @return the result of scanning |
|
419 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
420 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
421 |
public R visitSerialField(SerialFieldTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
422 |
R r = scan(node.getName(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
423 |
r = scanAndReduce(node.getType(), p, r); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
424 |
r = scanAndReduce(node.getDescription(), p, r); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
425 |
return r; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
426 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
427 |
|
25287 | 428 |
/** |
429 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
430 |
* |
|
431 |
* @param node {@inheritDoc} |
|
432 |
* @param p {@inheritDoc} |
|
433 |
* @return the result of scanning |
|
434 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
435 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
436 |
public R visitSince(SinceTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
437 |
return scan(node.getBody(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
438 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
439 |
|
25287 | 440 |
/** |
441 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
442 |
* |
|
443 |
* @param node {@inheritDoc} |
|
444 |
* @param p {@inheritDoc} |
|
445 |
* @return the result of scanning |
|
446 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
447 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
448 |
public R visitStartElement(StartElementTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
449 |
return scan(node.getAttributes(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
450 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
451 |
|
25287 | 452 |
/** |
46184
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
42831
diff
changeset
|
453 |
* {@inheritDoc} This implementation scans the children in left to right order. |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
42831
diff
changeset
|
454 |
* |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
42831
diff
changeset
|
455 |
* @param node {@inheritDoc} |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
42831
diff
changeset
|
456 |
* @param p {@inheritDoc} |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
42831
diff
changeset
|
457 |
* @return the result of scanning |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
42831
diff
changeset
|
458 |
* @since 10 |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
42831
diff
changeset
|
459 |
*/ |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
42831
diff
changeset
|
460 |
@Override |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
42831
diff
changeset
|
461 |
public R visitSummary(SummaryTree node, P p) { |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
42831
diff
changeset
|
462 |
R r = scan(node.getSummary(), p); |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
42831
diff
changeset
|
463 |
return r; |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
42831
diff
changeset
|
464 |
} |
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
42831
diff
changeset
|
465 |
|
f1325703ea85
8173425: Javadoc needs a new tag to specify the summary.
ksrini
parents:
42831
diff
changeset
|
466 |
/** |
25287 | 467 |
* {@inheritDoc} This implementation returns {@code null}. |
468 |
* |
|
469 |
* @param node {@inheritDoc} |
|
470 |
* @param p {@inheritDoc} |
|
471 |
* @return the result of scanning |
|
52487
5d1d07b72f15
5076751: System properties documentation needed in javadocs
pmuthuswamy
parents:
48028
diff
changeset
|
472 |
* @since 12 |
5d1d07b72f15
5076751: System properties documentation needed in javadocs
pmuthuswamy
parents:
48028
diff
changeset
|
473 |
*/ |
5d1d07b72f15
5076751: System properties documentation needed in javadocs
pmuthuswamy
parents:
48028
diff
changeset
|
474 |
@Override |
5d1d07b72f15
5076751: System properties documentation needed in javadocs
pmuthuswamy
parents:
48028
diff
changeset
|
475 |
public R visitSystemProperty(SystemPropertyTree node, P p) { |
5d1d07b72f15
5076751: System properties documentation needed in javadocs
pmuthuswamy
parents:
48028
diff
changeset
|
476 |
return null; |
5d1d07b72f15
5076751: System properties documentation needed in javadocs
pmuthuswamy
parents:
48028
diff
changeset
|
477 |
} |
5d1d07b72f15
5076751: System properties documentation needed in javadocs
pmuthuswamy
parents:
48028
diff
changeset
|
478 |
|
5d1d07b72f15
5076751: System properties documentation needed in javadocs
pmuthuswamy
parents:
48028
diff
changeset
|
479 |
/** |
5d1d07b72f15
5076751: System properties documentation needed in javadocs
pmuthuswamy
parents:
48028
diff
changeset
|
480 |
* {@inheritDoc} This implementation returns {@code null}. |
5d1d07b72f15
5076751: System properties documentation needed in javadocs
pmuthuswamy
parents:
48028
diff
changeset
|
481 |
* |
5d1d07b72f15
5076751: System properties documentation needed in javadocs
pmuthuswamy
parents:
48028
diff
changeset
|
482 |
* @param node {@inheritDoc} |
5d1d07b72f15
5076751: System properties documentation needed in javadocs
pmuthuswamy
parents:
48028
diff
changeset
|
483 |
* @param p {@inheritDoc} |
5d1d07b72f15
5076751: System properties documentation needed in javadocs
pmuthuswamy
parents:
48028
diff
changeset
|
484 |
* @return the result of scanning |
25287 | 485 |
*/ |
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
486 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
487 |
public R visitText(TextTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
488 |
return null; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
489 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
490 |
|
25287 | 491 |
/** |
492 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
493 |
* |
|
494 |
* @param node {@inheritDoc} |
|
495 |
* @param p {@inheritDoc} |
|
496 |
* @return the result of scanning |
|
497 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
498 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
499 |
public R visitThrows(ThrowsTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
500 |
R r = scan(node.getExceptionName(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
501 |
r = scanAndReduce(node.getDescription(), p, r); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
502 |
return r; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
503 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
504 |
|
25287 | 505 |
/** |
506 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
507 |
* |
|
508 |
* @param node {@inheritDoc} |
|
509 |
* @param p {@inheritDoc} |
|
510 |
* @return the result of scanning |
|
511 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
512 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
513 |
public R visitUnknownBlockTag(UnknownBlockTagTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
514 |
return scan(node.getContent(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
515 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
516 |
|
25287 | 517 |
/** |
518 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
519 |
* |
|
520 |
* @param node {@inheritDoc} |
|
521 |
* @param p {@inheritDoc} |
|
522 |
* @return the result of scanning |
|
523 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
524 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
525 |
public R visitUnknownInlineTag(UnknownInlineTagTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
526 |
return scan(node.getContent(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
527 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
528 |
|
25287 | 529 |
/** |
530 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
531 |
* |
|
532 |
* @param node {@inheritDoc} |
|
533 |
* @param p {@inheritDoc} |
|
534 |
* @return the result of scanning |
|
535 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
536 |
@Override |
42831
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
537 |
public R visitUses(UsesTree node, P p) { |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
538 |
R r = scan(node.getServiceType(), p); |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
539 |
r = scanAndReduce(node.getDescription(), p, r); |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
540 |
return r; |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
541 |
} |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
542 |
|
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
543 |
/** |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
544 |
* {@inheritDoc} This implementation scans the children in left to right order. |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
545 |
* |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
546 |
* @param node {@inheritDoc} |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
547 |
* @param p {@inheritDoc} |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
548 |
* @return the result of scanning |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
549 |
*/ |
feff6f296019
8160196: Module summary page should display information based on "api" or "detail" mode.
bpatel
parents:
37009
diff
changeset
|
550 |
@Override |
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
551 |
public R visitValue(ValueTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
552 |
return scan(node.getReference(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
553 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
554 |
|
25287 | 555 |
/** |
556 |
* {@inheritDoc} This implementation scans the children in left to right order. |
|
557 |
* |
|
558 |
* @param node {@inheritDoc} |
|
559 |
* @param p {@inheritDoc} |
|
560 |
* @return the result of scanning |
|
561 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
562 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
563 |
public R visitVersion(VersionTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
564 |
return scan(node.getBody(), p); |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
565 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
566 |
|
25287 | 567 |
/** |
568 |
* {@inheritDoc} This implementation returns {@code null}. |
|
569 |
* |
|
570 |
* @param node {@inheritDoc} |
|
571 |
* @param p {@inheritDoc} |
|
572 |
* @return the result of scanning |
|
573 |
*/ |
|
14541
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
574 |
@Override |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
575 |
public R visitOther(DocTree node, P p) { |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
576 |
return null; |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
577 |
} |
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
578 |
|
36f9d11fc9aa
7021614: extend com.sun.source API to support parsing javadoc comments
jjg
parents:
diff
changeset
|
579 |
} |