01: package com.sun.istack;
02:
03: import java.lang.annotation.Documented;
04: import java.lang.annotation.Retention;
05: import java.lang.annotation.RetentionPolicy;
06: import java.lang.annotation.Target;
07: import java.lang.annotation.ElementType;
08:
09: /**
10: * Designates that a field, return value, argument, or a variable is supposed
11: * to be an {@link String#intern() interned} string.
12: *
13: * <p>
14: * In many places in the istack, we assume Strings to be interned for
15: * the performance reason. Similarly, In many other places, we don't
16: * make such an assumption for the performance reason (because intern
17: * isn't free.)
18: *
19: * <p>
20: * Therefore, distinguishing which part is supposed to be interned and
21: * which part is supposed to be not is important. This annotation
22: * allows us to capture that in the code.
23: *
24: * @author Kohsuke Kawaguchi
25: */
26: @Documented
27: @Retention(RetentionPolicy.CLASS)
28: @Target({ElementType.FIELD,ElementType.METHOD,ElementType.PARAMETER,ElementType.LOCAL_VARIABLE})
29: public @interface Interned {
30: }
|