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

Print this page




  56  * begin with {@code "visit"} may be added to this class in the
  57  * future; to avoid incompatibilities, classes which extend this class
  58  * should not declare any instance methods with names beginning with
  59  * {@code "visit"}.
  60  *
  61  * <p>When such a new visit method is added, the default
  62  * implementation in this class will be to call the {@link
  63  * #visitUnknown visitUnknown} method.  A new abstract element kind
  64  * visitor class will also be introduced to correspond to the new
  65  * language level; this visitor will have different default behavior
  66  * for the visit method in question.  When the new visitor is
  67  * introduced, all or portions of this visitor may be deprecated.
  68  *
  69  * @param <R> the return type of this visitor's methods.  Use {@link
  70  *            Void} for visitors that do not need to return results.
  71  * @param <P> the type of the additional parameter to this visitor's
  72  *            methods.  Use {@code Void} for visitors that do not need an
  73  *            additional parameter.
  74  *
  75  * @see ElementKindVisitor6

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


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