45 * added to future versions of the Java™ programming language. 46 * Therefore, methods whose names begin with {@code "visit"} may be 47 * added to this class in the future; to avoid incompatibilities, 48 * classes which extend this class should not declare any instance 49 * methods with names beginning with {@code "visit"}. 50 * 51 * <p>When such a new visit method is added, the default 52 * implementation in this class will be to call the {@link 53 * #visitUnknown visitUnknown} method. A new abstract annotation 54 * value visitor class will also be introduced to correspond to the 55 * new language level; this visitor will have different default 56 * behavior for the visit method in question. When the new visitor is 57 * introduced, all or portions of this visitor may be deprecated. 58 * 59 * @param <R> the return type of this visitor's methods 60 * @param <P> the type of the additional parameter to this visitor's methods. 61 * 62 * @author Joseph D. Darcy 63 * @author Scott Seligman 64 * @author Peter von der Ahé 65 * @since 1.6 66 */ 67 @SupportedSourceVersion(RELEASE_6) 68 public abstract class AbstractAnnotationValueVisitor6<R, P> 69 implements AnnotationValueVisitor<R, P> { 70 71 /** 72 * Constructor for concrete subclasses to call. 73 */ 74 protected AbstractAnnotationValueVisitor6() {} 75 76 /** 77 * Visits an annotation value as if by passing itself to that 78 * value's {@link AnnotationValue#accept accept}. The invocation 79 * {@code v.visit(av)} is equivalent to {@code av.accept(v, p)}. 80 * @param av {@inheritDoc} 81 * @param p {@inheritDoc} 82 */ 83 public final R visit(AnnotationValue av, P p) { 84 return av.accept(this, p); | 45 * added to future versions of the Java™ programming language. 46 * Therefore, methods whose names begin with {@code "visit"} may be 47 * added to this class in the future; to avoid incompatibilities, 48 * classes which extend this class should not declare any instance 49 * methods with names beginning with {@code "visit"}. 50 * 51 * <p>When such a new visit method is added, the default 52 * implementation in this class will be to call the {@link 53 * #visitUnknown visitUnknown} method. A new abstract annotation 54 * value visitor class will also be introduced to correspond to the 55 * new language level; this visitor will have different default 56 * behavior for the visit method in question. When the new visitor is 57 * introduced, all or portions of this visitor may be deprecated. 58 * 59 * @param <R> the return type of this visitor's methods 60 * @param <P> the type of the additional parameter to this visitor's methods. 61 * 62 * @author Joseph D. Darcy 63 * @author Scott Seligman 64 * @author Peter von der Ahé 65 * 66 * @see AbstractAnnotationValueVisitor7 67 * @since 1.6 68 */ 69 @SupportedSourceVersion(RELEASE_6) 70 public abstract class AbstractAnnotationValueVisitor6<R, P> 71 implements AnnotationValueVisitor<R, P> { 72 73 /** 74 * Constructor for concrete subclasses to call. 75 */ 76 protected AbstractAnnotationValueVisitor6() {} 77 78 /** 79 * Visits an annotation value as if by passing itself to that 80 * value's {@link AnnotationValue#accept accept}. The invocation 81 * {@code v.visit(av)} is equivalent to {@code av.accept(v, p)}. 82 * @param av {@inheritDoc} 83 * @param p {@inheritDoc} 84 */ 85 public final R visit(AnnotationValue av, P p) { 86 return av.accept(this, p); |