39 * Therefore, methods whose names begin with {@code "visit"} may be
40 * added to this class in the future; to avoid incompatibilities,
41 * classes which extend this class should not declare any instance
42 * methods with names beginning with {@code "visit"}.
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 * @see AbstractTypeVisitor6
59 * @since 1.7
60 */
61 public abstract class AbstractTypeVisitor7<R, P> extends AbstractTypeVisitor6<R, P> {
62 /**
63 * Constructor for concrete subclasses to call.
64 */
65 protected AbstractTypeVisitor7() {
66 super();
67 }
68
69 /**
70 * Visits a {@code UnionType} in a manner defined by a subclass.
71 *
72 * @param t {@inheritDoc}
73 * @param p {@inheritDoc}
74 * @return the result of the visit as defined by a subclass
75 */
76 public abstract R visitUnion(UnionType t, P p);
77 }
|
39 * Therefore, methods whose names begin with {@code "visit"} may be
40 * added to this class in the future; to avoid incompatibilities,
41 * classes which extend this class should not declare any instance
42 * methods with names beginning with {@code "visit"}.
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 * @see AbstractTypeVisitor6
59 * @see AbstractTypeVisitor8
60 * @since 1.7
61 */
62 public abstract class AbstractTypeVisitor7<R, P> extends AbstractTypeVisitor6<R, P> {
63 /**
64 * Constructor for concrete subclasses to call.
65 */
66 protected AbstractTypeVisitor7() {
67 super();
68 }
69
70 /**
71 * Visits a {@code UnionType} in a manner defined by a subclass.
72 *
73 * @param t {@inheritDoc}
74 * @param p {@inheritDoc}
75 * @return the result of the visit as defined by a subclass
76 */
77 public abstract R visitUnion(UnionType t, P p);
78 }
|