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

Print this page




  43  *
  44  * <p>When such a new visit method is added, the default
  45  * implementation in this class will be to call the {@link
  46  * #visitUnknown visitUnknown} method.  A new abstract type visitor
  47  * class will also be introduced to correspond to the new language
  48  * level; this visitor will have different default behavior for the
  49  * visit method in question.  When the new visitor is introduced, all
  50  * or portions of this visitor may be deprecated.
  51  *
  52  * @param <R> the return type of this visitor's methods.  Use {@link
  53  *            Void} for visitors that do not need to return results.
  54  * @param <P> the type of the additional parameter to this visitor's
  55  *            methods.  Use {@code Void} for visitors that do not need an
  56  *            additional parameter.
  57  *
  58  * @author Joseph D. Darcy
  59  * @author Scott Seligman
  60  * @author Peter von der Ah&eacute;
  61  *
  62  * @see AbstractTypeVisitor7

  63  * @since 1.6
  64  */
  65 public abstract class AbstractTypeVisitor6<R, P> implements TypeVisitor<R, P> {
  66     /**
  67      * Constructor for concrete subclasses to call.
  68      */
  69     protected AbstractTypeVisitor6() {}
  70 
  71     /**
  72      * Visits any type mirror as if by passing itself to that type
  73      * mirror's {@link TypeMirror#accept accept} method.  The
  74      * invocation {@code v.visit(t, p)} is equivalent to {@code
  75      * t.accept(v, p)}.
  76      *
  77      * @param t  the type to visit
  78      * @param p  a visitor-specified parameter
  79      * @return a visitor-specified result
  80      */
  81     public final R visit(TypeMirror t, P p) {
  82         return t.accept(this, p);




  43  *
  44  * <p>When such a new visit method is added, the default
  45  * implementation in this class will be to call the {@link
  46  * #visitUnknown visitUnknown} method.  A new abstract type visitor
  47  * class will also be introduced to correspond to the new language
  48  * level; this visitor will have different default behavior for the
  49  * visit method in question.  When the new visitor is introduced, all
  50  * or portions of this visitor may be deprecated.
  51  *
  52  * @param <R> the return type of this visitor's methods.  Use {@link
  53  *            Void} for visitors that do not need to return results.
  54  * @param <P> the type of the additional parameter to this visitor's
  55  *            methods.  Use {@code Void} for visitors that do not need an
  56  *            additional parameter.
  57  *
  58  * @author Joseph D. Darcy
  59  * @author Scott Seligman
  60  * @author Peter von der Ah&eacute;
  61  *
  62  * @see AbstractTypeVisitor7
  63  * @see AbstractTypeVisitor8
  64  * @since 1.6
  65  */
  66 public abstract class AbstractTypeVisitor6<R, P> implements TypeVisitor<R, P> {
  67     /**
  68      * Constructor for concrete subclasses to call.
  69      */
  70     protected AbstractTypeVisitor6() {}
  71 
  72     /**
  73      * Visits any type mirror as if by passing itself to that type
  74      * mirror's {@link TypeMirror#accept accept} method.  The
  75      * invocation {@code v.visit(t, p)} is equivalent to {@code
  76      * t.accept(v, p)}.
  77      *
  78      * @param t  the type to visit
  79      * @param p  a visitor-specified parameter
  80      * @return a visitor-specified result
  81      */
  82     public final R visit(TypeMirror t, P p) {
  83         return t.accept(this, p);