是否有@minApi注解,类似于Android中的@TargetApi注解?

Is there @minApi annotation, analogous to @TargetApi annotation in Android?

int API_VERSION = 21;

@TargetApi(API_VERSION) 用于 Android 以指定 method/class 支持 API_VERSION 及以下。

我们能否镜像类似的东西,指定方法或 class 仅支持 API_VERSION 及更高版本?

注意:- 我没有找到任何这样的注解,但想问问社区他们是否遇到过类似的事情或者已经实现了自己的注解?

@RequiresApi:

Denotes that the annotated element should only be called on the given API level or higher.

This is similar in purpose to the older @TargetApi annotation, but more clearly expresses that this is a requirement on the caller, rather than being used to "suppress" warnings within the method that exceed the minSdkVersion.