package com.anno;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
public @interface MyAnno {
//当注解中使用的属性名为value时,对其赋值时可以不指定属性的名称而直接写上属性值接口;
//除了value意外的变量名都需要使用name=value的方式赋值。
String value() default "ddd"; //取的注解中的值 @MyAnno(value ="sss")默认值
String name() default "silence";
}
package anno;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import jav