69 * Therefore, methods whose names begin with {@code "visit"} may be
70 * added to this class in the future; to avoid incompatibilities,
71 * classes which extend this class should not declare any instance
72 * methods with names beginning with {@code "visit"}.
73 *
74 * <p>When such a new visit method is added, the default
75 * implementation in this class will be to call the {@link
76 * #visitUnknown visitUnknown} method. A new element scanner visitor
77 * class will also be introduced to correspond to the new language
78 * level; this visitor will have different default behavior for the
79 * visit method in question. When the new visitor is introduced, all
80 * or portions of this visitor may be deprecated.
81 *
82 * @param <R> the return type of this visitor's methods. Use {@link
83 * Void} for visitors that do not need to return results.
84 * @param <P> the type of the additional parameter to this visitor's
85 * methods. Use {@code Void} for visitors that do not need an
86 * additional parameter.
87 *
88 * @see ElementScanner6
89 * @since 1.7
90 */
91 @SupportedSourceVersion(RELEASE_7)
92 public class ElementScanner7<R, P> extends ElementScanner6<R, P> {
93 /**
94 * Constructor for concrete subclasses; uses {@code null} for the
95 * default value.
96 */
97 protected ElementScanner7(){
98 super(null);
99 }
100
101 /**
102 * Constructor for concrete subclasses; uses the argument for the
103 * default value.
104 */
105 protected ElementScanner7(R defaultValue){
106 super(defaultValue);
107 }
108
|
69 * Therefore, methods whose names begin with {@code "visit"} may be
70 * added to this class in the future; to avoid incompatibilities,
71 * classes which extend this class should not declare any instance
72 * methods with names beginning with {@code "visit"}.
73 *
74 * <p>When such a new visit method is added, the default
75 * implementation in this class will be to call the {@link
76 * #visitUnknown visitUnknown} method. A new element scanner visitor
77 * class will also be introduced to correspond to the new language
78 * level; this visitor will have different default behavior for the
79 * visit method in question. When the new visitor is introduced, all
80 * or portions of this visitor may be deprecated.
81 *
82 * @param <R> the return type of this visitor's methods. Use {@link
83 * Void} for visitors that do not need to return results.
84 * @param <P> the type of the additional parameter to this visitor's
85 * methods. Use {@code Void} for visitors that do not need an
86 * additional parameter.
87 *
88 * @see ElementScanner6
89 * @see ElementScanner8
90 * @since 1.7
91 */
92 @SupportedSourceVersion(RELEASE_7)
93 public class ElementScanner7<R, P> extends ElementScanner6<R, P> {
94 /**
95 * Constructor for concrete subclasses; uses {@code null} for the
96 * default value.
97 */
98 protected ElementScanner7(){
99 super(null);
100 }
101
102 /**
103 * Constructor for concrete subclasses; uses the argument for the
104 * default value.
105 */
106 protected ElementScanner7(R defaultValue){
107 super(defaultValue);
108 }
109
|