-
@Documented @Retention(CLASS) @Target({FIELD,METHOD,PARAMETER,LOCAL_VARIABLE}) public @interface Interned
Designates that a field, return value, argument, or a variable is supposed to be aninterned
string.In many places in the istack, we assume Strings to be interned for the performance reason. Similarly, In many other places, we don't make such an assumption for the performance reason (because intern isn't free.)
Therefore, distinguishing which part is supposed to be interned and which part is supposed to be not is important. This annotation allows us to capture that in the code.
- Author:
- Kohsuke Kawaguchi