Atrybuty adnotacji docelowych Java
@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
Glamorous Gaur