Android 自定义注解
作者:互联网
public interface UserConstant {
/**
* 性别
*/
int GIRL = 0;
int BOY = 1;
}
@Retention(RetentionPolicy.SOURCE)
@Target({ElementType.PARAMETER})
@IntDef(value = {UserConstant.BOY, UserConstant.GIRL})
public @interface Gender {
}
标签:BOY,自定义,UserConstant,int,public,interface,注解,Android,GIRL 来源: https://www.cnblogs.com/hanayouco/p/16469395.html