< prev index next >

src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java

Print this page

        

@@ -199,28 +199,27 @@
     interface DirectiveVisitor<R, P> {
         /**
          * Visits any directive as if by passing itself to that
          * directive's {@link Directive#accept accept} method and passing
          * {@code null} for the additional parameter.
-         * The invocation {@code v.visit(d)} is equivalent to
-         * {@code d.accept(v, null)}.
+         *
          * @param d  the directive to visit
          * @return a visitor-specified result
-         * @implSpec This implementation is {@code visit(d, null)}
+         * @implSpec The default implementation is {@code d.accept(v, null)}.
          */
         default R visit(Directive d) {
             return d.accept(this, null);
         }
 
         /**
          * Visits any directive as if by passing itself to that
          * directive's {@link Directive#accept accept} method.
-         * The invocation {@code v.visit(d, p)} is equivalent to
-         * {@code d.accept(v, p)}.
+         *
          * @param d  the directive to visit
          * @param p  a visitor-specified parameter
          * @return a visitor-specified result
+         * @implSpec The default implementation is {@code d.accept(v, p)}.
          */
         default R visit(Directive d, P p) {
             return d.accept(this, p);
         }
 

@@ -269,11 +268,11 @@
          * This can occur if the language evolves and new kinds of directive are added.
          * @param d  the directive to visit
          * @param p  a visitor-specified parameter
          * @return a visitor-specified result
          * @throws UnknownDirectiveException a visitor implementation may optionally throw this exception
-         * @implSpec This implementation throws {@code new UnknownDirectiveException(d, p)}.
+         * @implSpec The default implementation throws {@code new UnknownDirectiveException(d, p)}.
          */
         default R visitUnknown(Directive d, P p) {
             throw new UnknownDirectiveException(d, p);
         }
     }
< prev index next >