File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed
src/main/java/com/falsepattern/lib Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change
1
+ package com .falsepattern .lib ;
2
+
3
+ import java .lang .annotation .Documented ;
4
+ import java .lang .annotation .Retention ;
5
+ import java .lang .annotation .RetentionPolicy ;
6
+
7
+ /**
8
+ * Used together with {@link Deprecated} to specify when an API was marked stable, and when it was marked for deprecation.
9
+ * Deprecated classes MAY be removed after a full deprecation cycle as described inside the {@link StableAPI} javadoc.
10
+ */
11
+ @ Documented
12
+ @ Retention (RetentionPolicy .RUNTIME )
13
+ @ StableAPI (since = "0.10.0" )
14
+ public @interface DeprecationDetails {
15
+ @ StableAPI (since = "0.10.0" )
16
+ String stableSince () default "" ;
17
+ @ StableAPI (since = "0.10.0" )
18
+ String deprecatedSince ();
19
+ }
Original file line number Diff line number Diff line change 31
31
* If a class or method is NOT annotated with this annotation, it will be considered unstable, and the package/method
32
32
* arguments/etc. can freely change between patch releases without notice.
33
33
* <p>
34
- * If a class is annotated with this annotation, all currently existing public and protected members in the class will
35
- * be considered stable.
34
+ * NOTICE: You should no longer use this annotation exclusively on classes themselves, and instead, annotate every single
35
+ * public or protected member you want to expose as a public API!
36
36
* <p>
37
37
* Private members will never be considered stable, and can be removed without notice.
38
38
*/
39
39
@ Documented
40
- @ Retention (RetentionPolicy .CLASS )
40
+ @ Retention (RetentionPolicy .RUNTIME )
41
41
@ StableAPI (since = "0.6.0" )
42
42
public @interface StableAPI {
43
+ /**
44
+ * The version this API was introduced/stabilized in. Used for library version tracking.
45
+ */
46
+ @ StableAPI (since = "0.6.0" )
43
47
String since ();
44
48
}
You can’t perform that action at this time.
0 commit comments