src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java

Print this page

        

@@ -32,13 +32,13 @@
 
 /**
  * A simple visitor of types with default behavior appropriate for the
  * {@link SourceVersion#RELEASE_7 RELEASE_7} source version.
  *
- * Visit methods corresponding to {@code RELEASE_7} language
- * constructs call {@link #defaultAction}, passing their arguments to
- * {@code defaultAction}'s corresponding parameters.
+ * Visit methods corresponding to {@code RELEASE_7} and earlier
+ * language constructs call {@link #defaultAction}, passing their
+ * arguments to {@code defaultAction}'s corresponding parameters.
  *
  * <p> Methods in this class may be overridden subject to their
  * general contract.  Note that annotating methods in concrete
  * subclasses with {@link java.lang.Override @Override} will help
  * ensure that methods are overridden as intended.

@@ -86,6 +86,19 @@
      * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
      */
     protected SimpleTypeVisitor7(R defaultValue){
         super(defaultValue);
     }
+
+    /**
+     * This implementation visits a {@code DisjunctiveType} by calling
+     * {@code defaultAction}.
+     *
+     * @param t  {@inheritDoc}
+     * @param p  {@inheritDoc}
+     * @return the result of {@code defaultAction}
+     */
+    @Override
+    public R visitDisjunctive(DisjunctiveType t, P p) {
+        return defaultAction(t, p);        
+    }
 }