Merge "SystemApi is @Repeatable" am: 9e01566c50 am: 7a343584f5
Change-Id: I6b95641b6c56ff9d96342dbaa310c40270893a14
This commit is contained in:
@@ -23,6 +23,7 @@ import static java.lang.annotation.ElementType.METHOD;
|
|||||||
import static java.lang.annotation.ElementType.PACKAGE;
|
import static java.lang.annotation.ElementType.PACKAGE;
|
||||||
import static java.lang.annotation.ElementType.TYPE;
|
import static java.lang.annotation.ElementType.TYPE;
|
||||||
|
|
||||||
|
import java.lang.annotation.Repeatable;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
@@ -40,6 +41,7 @@ import java.lang.annotation.Target;
|
|||||||
*/
|
*/
|
||||||
@Target({TYPE, FIELD, METHOD, CONSTRUCTOR, ANNOTATION_TYPE, PACKAGE})
|
@Target({TYPE, FIELD, METHOD, CONSTRUCTOR, ANNOTATION_TYPE, PACKAGE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Repeatable(SystemApi.Container.class) // TODO(b/146727827): make this non-repeatable
|
||||||
public @interface SystemApi {
|
public @interface SystemApi {
|
||||||
enum Client {
|
enum Client {
|
||||||
/**
|
/**
|
||||||
@@ -95,4 +97,14 @@ public @interface SystemApi {
|
|||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
Process process() default android.annotation.SystemApi.Process.ALL;
|
Process process() default android.annotation.SystemApi.Process.ALL;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Container for {@link SystemApi} that allows it to be applied repeatedly to types.
|
||||||
|
*/
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target(TYPE)
|
||||||
|
@interface Container {
|
||||||
|
SystemApi[] value();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user