📜  Java 目标注解属性 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:09.046000             🧑  作者: Mango

代码示例1
@Target(ElementType.ANNOTATION_TYPE) - to use in other annotations
@Target(ElementType.CONSTRUCTOR) - to use in contructor declaration 
@Target(ElementType.FIELD) - to use in field declarions
@Target(ElementType.LOCAL_VARIABLE) - local variable declarations
@Target(ElementType.METHOD) - to use in method declarions
@Target(ElementType.MODULE) - to use in modules
@Target(ElementType.PACKAGE) - to use in package declaraions
@Target(ElementType.PARAMETER) - to use in parameters
@Target(ElementType.TYPE) - to use in class, interface (including annotation type), or enum declaration
@Target(ElementType.TYPE_PARAMETER) - type prameter declaraion
@Target(ElementType.TYPE_USE) - Use of a type