JAVA自定义注解标签

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.METHOD)//标签贴在何处
@Retention(RetentionPolicy.RUNTIME)//存活于JVM中。可以利用反射来赋予该注解功能
public @interface RequirePermission {
    String value();//表示权限的名称

}

 

posted @ 2019-07-19 20:16  Mlek  阅读(335)  评论(0编辑  收藏  举报