< prev index next >

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

Print this page




  73  * language feature cannot be used to this version of the API since
  74  * this version is required to be runnable on Java SE 7
  75  * implementations.  Future versions of the API that are only required
  76  * to run on Java SE 8 and later may take advantage of default methods
  77  * in this situation.
  78  *
  79  * @param <R> the return type of this visitor's methods.  Use {@link
  80  *            Void} for visitors that do not need to return results.
  81  * @param <P> the type of the additional parameter to this visitor's
  82  *            methods.  Use {@code Void} for visitors that do not need an
  83  *            additional parameter.
  84  *
  85  * @author Joseph D. Darcy
  86  * @author Scott Seligman
  87  * @author Peter von der Ah&eacute;
  88  *
  89  * @see ElementKindVisitor7
  90  * @see ElementKindVisitor8
  91  * @see ElementKindVisitor9
  92  * @since 1.6
  93  * @deprecated Release 6 is obsolete; update to a visitor for a newer
  94  * release level.
  95  */
  96 @Deprecated
  97 @SupportedSourceVersion(RELEASE_6)
  98 public class ElementKindVisitor6<R, P>
  99                   extends SimpleElementVisitor6<R, P> {
 100     /**
 101      * Constructor for concrete subclasses; uses {@code null} for the
 102      * default value.


 103      */

 104     protected ElementKindVisitor6() {
 105         super(null);
 106     }
 107 
 108     /**
 109      * Constructor for concrete subclasses; uses the argument for the
 110      * default value.
 111      *
 112      * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}


 113      */

 114     protected ElementKindVisitor6(R defaultValue) {
 115         super(defaultValue);
 116     }
 117 
 118     /**
 119      * {@inheritDoc}
 120      *
 121      * The element argument has kind {@code PACKAGE}.
 122      *
 123      * @param e {@inheritDoc}
 124      * @param p {@inheritDoc}
 125      * @return  {@inheritDoc}
 126      */
 127     @Override
 128     public R visitPackage(PackageElement e, P p) {
 129         assert e.getKind() == PACKAGE: "Bad kind on PackageElement";
 130         return defaultAction(e, p);
 131     }
 132 
 133     /**




  73  * language feature cannot be used to this version of the API since
  74  * this version is required to be runnable on Java SE 7
  75  * implementations.  Future versions of the API that are only required
  76  * to run on Java SE 8 and later may take advantage of default methods
  77  * in this situation.
  78  *
  79  * @param <R> the return type of this visitor's methods.  Use {@link
  80  *            Void} for visitors that do not need to return results.
  81  * @param <P> the type of the additional parameter to this visitor's
  82  *            methods.  Use {@code Void} for visitors that do not need an
  83  *            additional parameter.
  84  *
  85  * @author Joseph D. Darcy
  86  * @author Scott Seligman
  87  * @author Peter von der Ah&eacute;
  88  *
  89  * @see ElementKindVisitor7
  90  * @see ElementKindVisitor8
  91  * @see ElementKindVisitor9
  92  * @since 1.6


  93  */

  94 @SupportedSourceVersion(RELEASE_6)
  95 public class ElementKindVisitor6<R, P>
  96                   extends SimpleElementVisitor6<R, P> {
  97     /**
  98      * Constructor for concrete subclasses; uses {@code null} for the
  99      * default value.
 100      * @deprecated Release 6 is obsolete; update to a visitor for a newer
 101      * release level.
 102      */
 103     @Deprecated
 104     protected ElementKindVisitor6() {
 105         super(null);
 106     }
 107 
 108     /**
 109      * Constructor for concrete subclasses; uses the argument for the
 110      * default value.
 111      *
 112      * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
 113      * @deprecated Release 6 is obsolete; update to a visitor for a newer
 114      * release level.
 115      */
 116     @Deprecated
 117     protected ElementKindVisitor6(R defaultValue) {
 118         super(defaultValue);
 119     }
 120 
 121     /**
 122      * {@inheritDoc}
 123      *
 124      * The element argument has kind {@code PACKAGE}.
 125      *
 126      * @param e {@inheritDoc}
 127      * @param p {@inheritDoc}
 128      * @return  {@inheritDoc}
 129      */
 130     @Override
 131     public R visitPackage(PackageElement e, P p) {
 132         assert e.getKind() == PACKAGE: "Bad kind on PackageElement";
 133         return defaultAction(e, p);
 134     }
 135 
 136     /**


< prev index next >