< prev index next >

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

Print this page




  55  * <p>Note that adding a default implementation of a new visit method
  56  * in a visitor class will occur instead of adding a <em>default
  57  * method</em> directly in the visitor interface since a Java SE 8
  58  * language feature cannot be used to this version of the API since
  59  * this version is required to be runnable on Java SE 7
  60  * implementations.  Future versions of the API that are only required
  61  * to run on Java SE 8 and later may take advantage of default methods
  62  * in this situation.
  63  *
  64  * @param <R> the return type of this visitor's methods.  Use {@link
  65  *            Void} for visitors that do not need to return results.
  66  * @param <P> the type of the additional parameter to this visitor's
  67  *            methods.  Use {@code Void} for visitors that do not need an
  68  *            additional parameter.
  69  *
  70  * @see AbstractTypeVisitor6
  71  * @see AbstractTypeVisitor8
  72  * @see AbstractTypeVisitor9
  73  * @since 1.7
  74  */
  75 @SuppressWarnings("deprecation") // Superclass deprecated
  76 @SupportedSourceVersion(RELEASE_7)
  77 public abstract class AbstractTypeVisitor7<R, P> extends AbstractTypeVisitor6<R, P> {
  78     /**
  79      * Constructor for concrete subclasses to call.
  80      */

  81     protected AbstractTypeVisitor7() {
  82         super();
  83     }
  84 
  85     /**
  86      * Visits a {@code UnionType} in a manner defined by a subclass.
  87      *
  88      * @param t  {@inheritDoc}
  89      * @param p  {@inheritDoc}
  90      * @return the result of the visit as defined by a subclass
  91      */
  92     @Override
  93     public abstract R visitUnion(UnionType t, P p);
  94 }


  55  * <p>Note that adding a default implementation of a new visit method
  56  * in a visitor class will occur instead of adding a <em>default
  57  * method</em> directly in the visitor interface since a Java SE 8
  58  * language feature cannot be used to this version of the API since
  59  * this version is required to be runnable on Java SE 7
  60  * implementations.  Future versions of the API that are only required
  61  * to run on Java SE 8 and later may take advantage of default methods
  62  * in this situation.
  63  *
  64  * @param <R> the return type of this visitor's methods.  Use {@link
  65  *            Void} for visitors that do not need to return results.
  66  * @param <P> the type of the additional parameter to this visitor's
  67  *            methods.  Use {@code Void} for visitors that do not need an
  68  *            additional parameter.
  69  *
  70  * @see AbstractTypeVisitor6
  71  * @see AbstractTypeVisitor8
  72  * @see AbstractTypeVisitor9
  73  * @since 1.7
  74  */

  75 @SupportedSourceVersion(RELEASE_7)
  76 public abstract class AbstractTypeVisitor7<R, P> extends AbstractTypeVisitor6<R, P> {
  77     /**
  78      * Constructor for concrete subclasses to call.
  79      */
  80     @SuppressWarnings("deprecation") // Superclass constructor deprecated
  81     protected AbstractTypeVisitor7() {
  82         super();
  83     }
  84 
  85     /**
  86      * Visits a {@code UnionType} in a manner defined by a subclass.
  87      *
  88      * @param t  {@inheritDoc}
  89      * @param p  {@inheritDoc}
  90      * @return the result of the visit as defined by a subclass
  91      */
  92     @Override
  93     public abstract R visitUnion(UnionType t, P p);
  94 }
< prev index next >