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 3131 * If a class or method is NOT annotated with this annotation, it will be considered unstable, and the package/method
3232 * arguments/etc. can freely change between patch releases without notice.
3333 * <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!
3636 * <p>
3737 * Private members will never be considered stable, and can be removed without notice.
3838 */
3939@ Documented
40- @ Retention (RetentionPolicy .CLASS )
40+ @ Retention (RetentionPolicy .RUNTIME )
4141@ StableAPI (since = "0.6.0" )
4242public @interface StableAPI {
43+ /**
44+ * The version this API was introduced/stabilized in. Used for library version tracking.
45+ */
46+ @ StableAPI (since = "0.6.0" )
4347 String since ();
4448}
You can’t perform that action at this time.
0 commit comments