< prev index next >

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

Print this page




  79      * Constructor for concrete subclasses to call; uses {@code null}
  80      * for the default value.
  81      */
  82     @SuppressWarnings("deprecation") // Superclass constructor deprecated
  83     protected TypeKindVisitor7() {
  84         super(null);
  85     }
  86 
  87     /**
  88      * Constructor for concrete subclasses to call; uses the argument
  89      * for the default value.
  90      *
  91      * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
  92      */
  93     @SuppressWarnings("deprecation") // Superclass constructor deprecated
  94     protected TypeKindVisitor7(R defaultValue) {
  95         super(defaultValue);
  96     }
  97 
  98     /**
  99      * This implementation visits a {@code UnionType} by calling
 100      * {@code defaultAction}.

 101      *
 102      * @param t  {@inheritDoc}
 103      * @param p  {@inheritDoc}
 104      * @return the result of {@code defaultAction}
 105      */
 106     @Override
 107     public R visitUnion(UnionType t, P p) {
 108         return defaultAction(t, p);
 109     }
 110 }


  79      * Constructor for concrete subclasses to call; uses {@code null}
  80      * for the default value.
  81      */
  82     @SuppressWarnings("deprecation") // Superclass constructor deprecated
  83     protected TypeKindVisitor7() {
  84         super(null);
  85     }
  86 
  87     /**
  88      * Constructor for concrete subclasses to call; uses the argument
  89      * for the default value.
  90      *
  91      * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
  92      */
  93     @SuppressWarnings("deprecation") // Superclass constructor deprecated
  94     protected TypeKindVisitor7(R defaultValue) {
  95         super(defaultValue);
  96     }
  97 
  98     /**
  99      * {@inheritDoc}
 100      *
 101      * @implSpec This implementation calls {@code defaultAction}.
 102      *
 103      * @param t  {@inheritDoc}
 104      * @param p  {@inheritDoc}
 105      * @return the result of {@code defaultAction}
 106      */
 107     @Override
 108     public R visitUnion(UnionType t, P p) {
 109         return defaultAction(t, p);
 110     }
 111 }
< prev index next >