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{
// 自定义元注解
}