142 * of elements are added to the {@code Element} hierarchy.
143 *
144 * @param e the element to visit
145 * @param p a visitor-specified parameter
146 * @return a visitor-specified result
147 * @throws UnknownElementException
148 * a visitor implementation may optionally throw this exception
149 */
150 R visitUnknown(Element e, P p);
151
152 /**
153 * Visits a module element.
154 *
155 * @implSpec Visits a {@code ModuleElement} by calling {@code
156 * visitUnknown(e, p)}.
157 *
158 * @param e the element to visit
159 * @param p a visitor-specified parameter
160 * @return a visitor-specified result
161 * @since 9
162 */
163 default R visitModule(ModuleElement e, P p) {
164 return visitUnknown(e, p);
165 }
166 }
|
142 * of elements are added to the {@code Element} hierarchy.
143 *
144 * @param e the element to visit
145 * @param p a visitor-specified parameter
146 * @return a visitor-specified result
147 * @throws UnknownElementException
148 * a visitor implementation may optionally throw this exception
149 */
150 R visitUnknown(Element e, P p);
151
152 /**
153 * Visits a module element.
154 *
155 * @implSpec Visits a {@code ModuleElement} by calling {@code
156 * visitUnknown(e, p)}.
157 *
158 * @param e the element to visit
159 * @param p a visitor-specified parameter
160 * @return a visitor-specified result
161 * @since 9
162 * @spec JPMS
163 */
164 default R visitModule(ModuleElement e, P p) {
165 return visitUnknown(e, p);
166 }
167 }
|