1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package com.puppycrawl.tools.checkstyle.checks.design.visibilitymodifier;
23
24 import com.google.common.annotations.VisibleForTesting;
25
26 import org.junit.ClassRule;
27 import org.junit.Rule;
28 import org.junit.rules.TemporaryFolder;
29
30 import java.lang.annotation.ElementType;
31 import java.lang.annotation.Retention;
32 import java.lang.annotation.RetentionPolicy;
33 import java.lang.annotation.Target;
34
35 public class InputVisibilityModifierAnnotated {
36 @Rule
37 public TemporaryFolder publicJUnitRule = new TemporaryFolder();
38
39 @org.junit.Rule
40 public TemporaryFolder fqPublicJUnitRule = new TemporaryFolder();
41
42 @VisibleForTesting
43 public String googleCommonsAnnotatedPublic;
44
45 @VisibleForTesting
46 String googleCommonsAnnotatedPackage;
47
48 @VisibleForTesting
49 protected String googleCommonsAnnotatedProtected;
50
51 @com.google.common.annotations.VisibleForTesting
52 public String fqGoogleCommonsAnnotatedPublic;
53
54 @com.google.common.annotations.VisibleForTesting
55 String fqGoogleCommonsAnnotatedPackage;
56
57 @com.google.common.annotations.VisibleForTesting
58 protected String fqGoogleCommonsAnnotatedProtected;
59
60 @CustomAnnotation
61 public String customAnnotatedPublic;
62
63 @CustomAnnotation
64 String customAnnotatedPackage;
65
66 @CustomAnnotation
67 protected String customAnnotatedProtected;
68
69 public String unannotatedPublic;
70 String unannotatedPackage;
71 protected String unannotatedProtected;
72 private String unannotatedPrivate;
73
74 @Retention(value=RetentionPolicy.RUNTIME)
75 @Target(value={ElementType.FIELD})
76 public @interface CustomAnnotation {
77 }
78
79 @ClassRule
80 public static TemporaryFolder publicJUnitClassRule = new TemporaryFolder();
81
82 @org.junit.ClassRule
83 public static TemporaryFolder fqPublicJUnitClassRule = new TemporaryFolder();
84
85 @CustomAnnotation @VisibleForTesting Integer initialCapacity;
86 }