65 * 66 * @param <R> the return type of this visitor's methods. Use {@link 67 * Void} for visitors that do not need to return results. 68 * @param <P> the type of the additional parameter to this visitor's 69 * methods. Use {@code Void} for visitors that do not need an 70 * additional parameter. 71 * 72 * @see TypeKindVisitor6 73 * @see TypeKindVisitor8 74 * @since 1.7 75 */ 76 @SupportedSourceVersion(RELEASE_7) 77 public class TypeKindVisitor7<R, P> extends TypeKindVisitor6<R, P> { 78 /** 79 * Constructor for concrete subclasses to call; uses {@code null} 80 * for the default value. 81 * 82 * @deprecated Release 7 is obsolete; update to a visitor for a newer 83 * release level. 84 */ 85 @Deprecated 86 protected TypeKindVisitor7() { 87 super(null); // Superclass constructor deprecated too 88 } 89 90 /** 91 * Constructor for concrete subclasses to call; uses the argument 92 * for the default value. 93 * 94 * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} 95 * 96 * @deprecated Release 7 is obsolete; update to a visitor for a newer 97 * release level. 98 */ 99 @Deprecated 100 protected TypeKindVisitor7(R defaultValue) { 101 super(defaultValue); // Superclass constructor deprecated too 102 } 103 104 /** 105 * {@inheritDoc} 106 * 107 * @implSpec This implementation calls {@code defaultAction}. 108 * 109 * @param t {@inheritDoc} 110 * @param p {@inheritDoc} 111 * @return the result of {@code defaultAction} 112 */ 113 @Override 114 public R visitUnion(UnionType t, P p) { 115 return defaultAction(t, p); 116 } 117 } | 65 * 66 * @param <R> the return type of this visitor's methods. Use {@link 67 * Void} for visitors that do not need to return results. 68 * @param <P> the type of the additional parameter to this visitor's 69 * methods. Use {@code Void} for visitors that do not need an 70 * additional parameter. 71 * 72 * @see TypeKindVisitor6 73 * @see TypeKindVisitor8 74 * @since 1.7 75 */ 76 @SupportedSourceVersion(RELEASE_7) 77 public class TypeKindVisitor7<R, P> extends TypeKindVisitor6<R, P> { 78 /** 79 * Constructor for concrete subclasses to call; uses {@code null} 80 * for the default value. 81 * 82 * @deprecated Release 7 is obsolete; update to a visitor for a newer 83 * release level. 84 */ 85 @Deprecated(since="12") 86 protected TypeKindVisitor7() { 87 super(null); // Superclass constructor deprecated too 88 } 89 90 /** 91 * Constructor for concrete subclasses to call; uses the argument 92 * for the default value. 93 * 94 * @param defaultValue the value to assign to {@link #DEFAULT_VALUE} 95 * 96 * @deprecated Release 7 is obsolete; update to a visitor for a newer 97 * release level. 98 */ 99 @Deprecated(since="12") 100 protected TypeKindVisitor7(R defaultValue) { 101 super(defaultValue); // Superclass constructor deprecated too 102 } 103 104 /** 105 * {@inheritDoc} 106 * 107 * @implSpec This implementation calls {@code defaultAction}. 108 * 109 * @param t {@inheritDoc} 110 * @param p {@inheritDoc} 111 * @return the result of {@code defaultAction} 112 */ 113 @Override 114 public R visitUnion(UnionType t, P p) { 115 return defaultAction(t, p); 116 } 117 } |