32 import javax.lang.model.type.TypeMirror;
33 import static javax.lang.model.SourceVersion.*;
34 import javax.lang.model.SourceVersion;
35 import javax.annotation.processing.SupportedSourceVersion;
36
37 /**
38 * A simple visitor for annotation values with default behavior
39 * appropriate for the {@link SourceVersion#RELEASE_6 RELEASE_6}
40 * source version. Visit methods call {@link
41 * #defaultAction} passing their arguments to {@code defaultAction}'s
42 * corresponding parameters.
43 *
44 * @apiNote
45 * Methods in this class may be overridden subject to their general
46 * contract.
47 *
48 * <p id=note_for_subclasses><strong>WARNING:</strong> The {@code
49 * AnnotationValueVisitor} interface implemented by this class may
50 * have methods added to it in the future to accommodate new,
51 * currently unknown, language structures added to future versions of
52 * the Java™ programming language. Therefore, methods whose
53 * names begin with {@code "visit"} may be added to this class in the
54 * future; to avoid incompatibilities, classes and subclasses which
55 * extend this class should not declare any instance methods with
56 * names beginning with {@code "visit"}.</p>
57 *
58 * <p>When such a new visit method is added, the default
59 * implementation in this class will be to directly or indirectly call
60 * the {@link #visitUnknown visitUnknown} method. A new simple
61 * annotation value visitor class will also be introduced to
62 * correspond to the new language level; this visitor will have
63 * different default behavior for the visit method in question. When
64 * a new visitor is introduced, portions of this visitor class may be
65 * deprecated, including its constructors.
66 *
67 * @param <R> the return type of this visitor's methods
68 * @param <P> the type of the additional parameter to this visitor's methods.
69 *
70 * @author Joseph D. Darcy
71 * @author Scott Seligman
72 * @author Peter von der Ahé
|
32 import javax.lang.model.type.TypeMirror;
33 import static javax.lang.model.SourceVersion.*;
34 import javax.lang.model.SourceVersion;
35 import javax.annotation.processing.SupportedSourceVersion;
36
37 /**
38 * A simple visitor for annotation values with default behavior
39 * appropriate for the {@link SourceVersion#RELEASE_6 RELEASE_6}
40 * source version. Visit methods call {@link
41 * #defaultAction} passing their arguments to {@code defaultAction}'s
42 * corresponding parameters.
43 *
44 * @apiNote
45 * Methods in this class may be overridden subject to their general
46 * contract.
47 *
48 * <p id=note_for_subclasses><strong>WARNING:</strong> The {@code
49 * AnnotationValueVisitor} interface implemented by this class may
50 * have methods added to it in the future to accommodate new,
51 * currently unknown, language structures added to future versions of
52 * the Java programming language. Therefore, methods whose
53 * names begin with {@code "visit"} may be added to this class in the
54 * future; to avoid incompatibilities, classes and subclasses which
55 * extend this class should not declare any instance methods with
56 * names beginning with {@code "visit"}.</p>
57 *
58 * <p>When such a new visit method is added, the default
59 * implementation in this class will be to directly or indirectly call
60 * the {@link #visitUnknown visitUnknown} method. A new simple
61 * annotation value visitor class will also be introduced to
62 * correspond to the new language level; this visitor will have
63 * different default behavior for the visit method in question. When
64 * a new visitor is introduced, portions of this visitor class may be
65 * deprecated, including its constructors.
66 *
67 * @param <R> the return type of this visitor's methods
68 * @param <P> the type of the additional parameter to this visitor's methods.
69 *
70 * @author Joseph D. Darcy
71 * @author Scott Seligman
72 * @author Peter von der Ahé
|