03 元注解

package annotate;

import java.lang.annotation.ElementType;
import java.lang.annotation.*;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

@myAnnotate 
public class Test03 {
    @myAnnotate
    public  void test(){}
}


@Target(value = {METHOD,TYPE})
@Retention(value = RUNTIME)
@Documented
@Inherited
@interface myAnnotate{
    // 自定义元注解
}
posted @ 2023-09-10 20:30  被占用的小海海  阅读(16)  评论(0)    收藏  举报