< prev index next >

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

Print this page




  59  * language feature cannot be used to this version of the API since
  60  * this version is required to be runnable on Java SE 7
  61  * implementations.  Future versions of the API that are only required
  62  * to run on Java SE 8 and later may take advantage of default methods
  63  * in this situation.
  64  *
  65  * @param <R> the return type of this visitor's methods.  Use {@link
  66  *            Void} for visitors that do not need to return results.
  67  * @param <P> the type of the additional parameter to this visitor's
  68  *            methods.  Use {@code Void} for visitors that do not need an
  69  *            additional parameter.
  70  *
  71  * @author Joseph D. Darcy
  72  * @author Scott Seligman
  73  * @author Peter von der Ah&eacute;
  74  *
  75  * @see AbstractElementVisitor7
  76  * @see AbstractElementVisitor8
  77  * @see AbstractElementVisitor9
  78  * @since 1.6
  79  * @deprecated Release 6 is obsolete; update to a visitor for a newer
  80  * release level.
  81  */
  82 @Deprecated
  83 @SupportedSourceVersion(RELEASE_6)
  84 public abstract class AbstractElementVisitor6<R, P> implements ElementVisitor<R, P> {
  85     /**
  86      * Constructor for concrete subclasses to call.


  87      */

  88     protected AbstractElementVisitor6(){}
  89 
  90     /**
  91      * Visits any program element as if by passing itself to that
  92      * element's {@link Element#accept accept} method.  The invocation
  93      * {@code v.visit(elem)} is equivalent to {@code elem.accept(v,
  94      * p)}.
  95      *
  96      * @param e  the element to visit
  97      * @param p  a visitor-specified parameter
  98      * @return a visitor-specified result
  99      */
 100     public final R visit(Element e, P p) {
 101         return e.accept(this, p);
 102     }
 103 
 104     /**
 105      * Visits any program element as if by passing itself to that
 106      * element's {@link Element#accept accept} method and passing
 107      * {@code null} for the additional parameter.  The invocation




  59  * language feature cannot be used to this version of the API since
  60  * this version is required to be runnable on Java SE 7
  61  * implementations.  Future versions of the API that are only required
  62  * to run on Java SE 8 and later may take advantage of default methods
  63  * in this situation.
  64  *
  65  * @param <R> the return type of this visitor's methods.  Use {@link
  66  *            Void} for visitors that do not need to return results.
  67  * @param <P> the type of the additional parameter to this visitor's
  68  *            methods.  Use {@code Void} for visitors that do not need an
  69  *            additional parameter.
  70  *
  71  * @author Joseph D. Darcy
  72  * @author Scott Seligman
  73  * @author Peter von der Ah&eacute;
  74  *
  75  * @see AbstractElementVisitor7
  76  * @see AbstractElementVisitor8
  77  * @see AbstractElementVisitor9
  78  * @since 1.6


  79  */

  80 @SupportedSourceVersion(RELEASE_6)
  81 public abstract class AbstractElementVisitor6<R, P> implements ElementVisitor<R, P> {
  82     /**
  83      * Constructor for concrete subclasses to call.
  84      * @deprecated Release 6 is obsolete; update to a visitor for a newer
  85      * release level.
  86      */
  87     @Deprecated
  88     protected AbstractElementVisitor6(){}
  89 
  90     /**
  91      * Visits any program element as if by passing itself to that
  92      * element's {@link Element#accept accept} method.  The invocation
  93      * {@code v.visit(elem)} is equivalent to {@code elem.accept(v,
  94      * p)}.
  95      *
  96      * @param e  the element to visit
  97      * @param p  a visitor-specified parameter
  98      * @return a visitor-specified result
  99      */
 100     public final R visit(Element e, P p) {
 101         return e.accept(this, p);
 102     }
 103 
 104     /**
 105      * Visits any program element as if by passing itself to that
 106      * element's {@link Element#accept accept} method and passing
 107      * {@code null} for the additional parameter.  The invocation


< prev index next >