For example, this meta-annotation indicates that the declared type is itself a meta-annotation type.
例如,这个元注释表明被定义的类型是本身的元注释类型。只能被用在定义的注释类型上。
You can use four predefined annotation types — referred to as meta-annotations — to annotate your annotations.
您可以使用4种预定义的注释类型(称为元注释)对您的注释进行注释。
However, an even simpler approach is to create an annotation for these task objects and provide the @Component meta-annotation.
然而,更简单的方法是为这些任务对象创建一个注解并提供@Component元注解。
The most obvious meta-annotation is one that allows you to indicate which program elements can have annotations of the defined type.
最明显的元注释就是允许何种程序元素具有定义的注释类型。
The final meta-annotation, Inherited, is probably the most complicated to demonstrate, the least-often used, and the one that creates the most confusion.
最后一个元注释 Inherited ,可能是最复杂、使用最少、也最容易造成混淆的一个。
It is a compile-time error for a single ElementType constant to appear more than once in a Target annotation. For example, the following meta-annotation is illegal.
对于一个元素类型常量出现多余一个的目标注释是编译错误的。例如下面的例子是不合法的。
It is a compile-time error for a single ElementType constant to appear more than once in a Target annotation. For example, the following meta-annotation is illegal.
对于一个元素类型常量出现多余一个的目标注释是编译错误的。例如下面的例子是不合法的。
应用推荐