package com.z.z.bean;
import androidx.annotation.IntDef;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import static com.z.z.bean.MustPosition.FIRST;
import static com.z.z.bean.MustPosition.SECOND;
@IntDef({FIRST, SECOND})
@Retention(RetentionPolicy.SOURCE)
public @interface MustPosition {
public static final int FIRST = 0;
public static final int SECOND = 1;
}
注解被使用的位置:
/*
* 供外部调用,改变此view的被选中条目
*/
public void setSlect(@MustPosition int posi) {
}
标签:MustPosition,annotation,SECOND,static,import,注解,Android,参数,public
来源: https://www.cnblogs.com/Oldz/p/13744357.html