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 * @author Joseph D. Darcy 89 * @author Scott Seligman 90 * @author Peter von der Ahé 91 * @since 1.6 92 */ 93 @SupportedSourceVersion(RELEASE_6) 94 public class ElementScanner6<R, P> extends AbstractElementVisitor6<R, P> { 95 /** 96 * The specified default value. 97 */ 98 protected final R DEFAULT_VALUE; 99 100 /** 101 * Constructor for concrete subclasses; uses {@code null} for the 102 * default value. 103 */ 104 protected ElementScanner6(){ 105 DEFAULT_VALUE = null; 106 } 107 108 /** 109 * Constructor for concrete subclasses; uses the argument for the 110 * default value. | 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 * @author Joseph D. Darcy 89 * @author Scott Seligman 90 * @author Peter von der Ahé 91 * 92 * @see ElementScanner7 93 * @since 1.6 94 */ 95 @SupportedSourceVersion(RELEASE_6) 96 public class ElementScanner6<R, P> extends AbstractElementVisitor6<R, P> { 97 /** 98 * The specified default value. 99 */ 100 protected final R DEFAULT_VALUE; 101 102 /** 103 * Constructor for concrete subclasses; uses {@code null} for the 104 * default value. 105 */ 106 protected ElementScanner6(){ 107 DEFAULT_VALUE = null; 108 } 109 110 /** 111 * Constructor for concrete subclasses; uses the argument for the 112 * default value. |