35 * <p>The syntactic locations where annotations may appear are split into |
35 * <p>The syntactic locations where annotations may appear are split into |
36 * <em>declaration contexts</em> , where annotations apply to declarations, and |
36 * <em>declaration contexts</em> , where annotations apply to declarations, and |
37 * <em>type contexts</em> , where annotations apply to types used in |
37 * <em>type contexts</em> , where annotations apply to types used in |
38 * declarations and expressions. |
38 * declarations and expressions. |
39 * |
39 * |
40 * <p>The constants {@link #ANNOTATION_TYPE} , {@link #CONSTRUCTOR} , {@link |
40 * <p>The constants {@link #ANNOTATION_TYPE}, {@link #CONSTRUCTOR}, {@link |
41 * #FIELD} , {@link #LOCAL_VARIABLE} , {@link #METHOD} , {@link #PACKAGE} , |
41 * #FIELD}, {@link #LOCAL_VARIABLE}, {@link #METHOD}, {@link #PACKAGE}, {@link |
42 * {@link #PARAMETER} , {@link #TYPE} , and {@link #TYPE_PARAMETER} correspond |
42 * #MODULE}, {@link #PARAMETER}, {@link #TYPE}, and {@link #TYPE_PARAMETER} |
43 * to the declaration contexts in JLS 9.6.4.1. |
43 * correspond to the declaration contexts in JLS 9.6.4.1. |
44 * |
44 * |
45 * <p>For example, an annotation whose type is meta-annotated with |
45 * <p>For example, an annotation whose type is meta-annotated with |
46 * {@code @Target(ElementType.FIELD)} may only be written as a modifier for a |
46 * {@code @Target(ElementType.FIELD)} may only be written as a modifier for a |
47 * field declaration. |
47 * field declaration. |
48 * |
48 * |