Skip to content

Commit 31bd1a1

Browse files
committed
PropertyKey: add METHOD target; rectify the documentation
1 parent d57aec6 commit 31bd1a1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

common/src/main/java/org/jetbrains/annotations/PropertyKey.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
import java.lang.annotation.*;
2020

2121
/**
22-
* Specifies that a method parameter accepts arguments which must be valid property
23-
* keys in a specific resource bundle. When a string literal which is not a property
24-
* key in the specified bundle is passed as a parameter, IntelliJ IDEA highlights
25-
* it as an error. The annotation is also used to provide completion in string literals
26-
* passed as parameters.
22+
* Specifies that a method parameter, local variable, field or a method return value
23+
* must be a valid property key in a specific resource bundle. When a string literal
24+
* which is not a property key in the specified bundle is passed as a parameter,
25+
* static analyzers may highlight it as an error. The annotation is also could be used
26+
* by IDEs to provide completion in string literals passed as parameters.
2727
*/
2828
@Documented
2929
@Retention(RetentionPolicy.CLASS)
30-
@Target({ElementType.PARAMETER, ElementType.LOCAL_VARIABLE, ElementType.FIELD})
30+
@Target({ElementType.PARAMETER, ElementType.LOCAL_VARIABLE, ElementType.FIELD, ElementType.METHOD})
3131
public @interface PropertyKey {
3232
/**
3333
* The full-qualified name of the resource bundle in which the property keys must

0 commit comments

Comments
 (0)