1
2
3
4
5
6
7
8
9
10
11 package com.puppycrawl.tools.checkstyle.checks.annotation.annotationlocation;
12
13 import java.lang.annotation.ElementType;
14 import java.lang.annotation.Repeatable;
15 import java.lang.annotation.Target;
16
17 @ClassAnnotation(value = "foo")
18 @ClassAnnotation
19
20 @ClassAnnotation("bar") class InputAnnotationLocationClass {
21
22 @ClassAnnotation(value = "foo")
23 @ClassAnnotation
24 @ClassAnnotation("bar") Object field;
25
26 @ClassAnnotation(value = "foo")
27 @ClassAnnotation
28
29 @ClassAnnotation("bar") InputAnnotationLocationClass() {
30 }
31
32 }
33
34 @Repeatable(ClassAnnotations.class)
35 @Target({ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.TYPE})
36 @interface ClassAnnotation {
37
38 String value() default "";
39
40 }
41
42 @Target({ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.TYPE})
43 @interface ClassAnnotations {
44
45 ClassAnnotation[] value();
46
47 }