1
+ /*
2
+ * Copyright 2000-2015 JetBrains s.r.o.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ package org .jetbrains .annotations ;
17
+
18
+ import java .lang .annotation .Documented ;
19
+ import java .lang .annotation .ElementType ;
20
+ import java .lang .annotation .Retention ;
21
+ import java .lang .annotation .RetentionPolicy ;
22
+ import java .lang .annotation .Target ;
23
+
24
+ /**
25
+ * A member or type annotated with VisibleForTesting claims that its visibility is higher than necessary,
26
+ * only for testing purposes. In particular:
27
+ * <ul>
28
+ * <li>If public or protected member/type is annotated with VisibleForTesting,
29
+ * it's assumed that package-private access is enough for production code.</li>
30
+ * <li>If package-private member/type is annotated with VisibleForTesting,
31
+ * it's assumed that private access is enough for production code.</li>
32
+ * <li>It's illegal to annotate private member/type as VisibleForTesting.</li>
33
+ * </ul>
34
+ *
35
+ * @since 20.0.0
36
+ */
37
+ @ Documented
38
+ @ Retention (RetentionPolicy .SOURCE )
39
+ @ Target ({ElementType .METHOD , ElementType .CONSTRUCTOR , ElementType .FIELD , ElementType .TYPE })
40
+ public @interface VisibleForTesting { }
0 commit comments