54 * Therefore, methods whose names begin with {@code "visit"} may be
55 * added to this class in the future; to avoid incompatibilities,
56 * classes which extend this class should not declare any instance
57 * methods with names beginning with {@code "visit"}.
58 *
59 * <p>When such a new visit method is added, the default
60 * implementation in this class will be to call the {@link
61 * #visitUnknown visitUnknown} method. A new type kind visitor class
62 * will also be introduced to correspond to the new language level;
63 * this visitor will have different default behavior for the visit
64 * method in question. When the new visitor is introduced, all or
65 * portions of this visitor may be deprecated.
66 *
67 * @param <R> the return type of this visitor's methods. Use {@link
68 * Void} for visitors that do not need to return results.
69 * @param <P> the type of the additional parameter to this visitor's
70 * methods. Use {@code Void} for visitors that do not need an
71 * additional parameter.
72 *
73 * @see TypeKindVisitor6
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 protected TypeKindVisitor7() {
83 super(null);
84 }
85
86 /**
87 * Constructor for concrete subclasses to call; uses the argument
88 * for the default value.
89 *
90 * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
91 */
92 protected TypeKindVisitor7(R defaultValue) {
93 super(defaultValue);
|
54 * Therefore, methods whose names begin with {@code "visit"} may be
55 * added to this class in the future; to avoid incompatibilities,
56 * classes which extend this class should not declare any instance
57 * methods with names beginning with {@code "visit"}.
58 *
59 * <p>When such a new visit method is added, the default
60 * implementation in this class will be to call the {@link
61 * #visitUnknown visitUnknown} method. A new type kind visitor class
62 * will also be introduced to correspond to the new language level;
63 * this visitor will have different default behavior for the visit
64 * method in question. When the new visitor is introduced, all or
65 * portions of this visitor may be deprecated.
66 *
67 * @param <R> the return type of this visitor's methods. Use {@link
68 * Void} for visitors that do not need to return results.
69 * @param <P> the type of the additional parameter to this visitor's
70 * methods. Use {@code Void} for visitors that do not need an
71 * additional parameter.
72 *
73 * @see TypeKindVisitor6
74 * @see TypeKindVisitor8
75 * @since 1.7
76 */
77 @SupportedSourceVersion(RELEASE_7)
78 public class TypeKindVisitor7<R, P> extends TypeKindVisitor6<R, P> {
79 /**
80 * Constructor for concrete subclasses to call; uses {@code null}
81 * for the default value.
82 */
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 protected TypeKindVisitor7(R defaultValue) {
94 super(defaultValue);
|