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

Print this page




  59  * should not declare any instance methods with names beginning with
  60  * {@code "visit"}.
  61  *
  62  * <p>When such a new visit method is added, the default
  63  * implementation in this class will be to call the {@link
  64  * #visitUnknown visitUnknown} method.  A new abstract element kind
  65  * visitor class will also be introduced to correspond to the new
  66  * language level; this visitor will have different default behavior
  67  * for the visit method in question.  When the new visitor is
  68  * introduced, all or portions of this visitor may be deprecated.
  69  *
  70  * @param <R> the return type of this visitor's methods.  Use {@link
  71  *            Void} for visitors that do not need to return results.
  72  * @param <P> the type of the additional parameter to this visitor's
  73  *            methods.  Use {@code Void} for visitors that do not need an
  74  *            additional parameter.
  75  *
  76  * @author Joseph D. Darcy
  77  * @author Scott Seligman
  78  * @author Peter von der Ah&eacute;


  79  * @since 1.6
  80  */
  81 @SupportedSourceVersion(RELEASE_6)
  82 public class ElementKindVisitor6<R, P>
  83                   extends SimpleElementVisitor6<R, P> {
  84     /**
  85      * Constructor for concrete subclasses; uses {@code null} for the
  86      * default value.
  87      */
  88     protected ElementKindVisitor6() {
  89         super(null);
  90     }
  91 
  92     /**
  93      * Constructor for concrete subclasses; uses the argument for the
  94      * default value.
  95      *
  96      * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
  97      */
  98     protected ElementKindVisitor6(R defaultValue) {




  59  * should not declare any instance methods with names beginning with
  60  * {@code "visit"}.
  61  *
  62  * <p>When such a new visit method is added, the default
  63  * implementation in this class will be to call the {@link
  64  * #visitUnknown visitUnknown} method.  A new abstract element kind
  65  * visitor class will also be introduced to correspond to the new
  66  * language level; this visitor will have different default behavior
  67  * for the visit method in question.  When the new visitor is
  68  * introduced, all or portions of this visitor may be deprecated.
  69  *
  70  * @param <R> the return type of this visitor's methods.  Use {@link
  71  *            Void} for visitors that do not need to return results.
  72  * @param <P> the type of the additional parameter to this visitor's
  73  *            methods.  Use {@code Void} for visitors that do not need an
  74  *            additional parameter.
  75  *
  76  * @author Joseph D. Darcy
  77  * @author Scott Seligman
  78  * @author Peter von der Ah&eacute;
  79  *
  80  * @see ElementKindVisitor7
  81  * @since 1.6
  82  */
  83 @SupportedSourceVersion(RELEASE_6)
  84 public class ElementKindVisitor6<R, P>
  85                   extends SimpleElementVisitor6<R, P> {
  86     /**
  87      * Constructor for concrete subclasses; uses {@code null} for the
  88      * default value.
  89      */
  90     protected ElementKindVisitor6() {
  91         super(null);
  92     }
  93 
  94     /**
  95      * Constructor for concrete subclasses; uses the argument for the
  96      * default value.
  97      *
  98      * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
  99      */
 100     protected ElementKindVisitor6(R defaultValue) {