@Documented @Retention(value=RUNTIME) @Target(value={TYPE_USE,TYPE_PARAMETER}) @SubtypeOf(value=UnknownInterned.class) @QualifierForLiterals(value={PRIMITIVE,STRING}) @DefaultFor(typeKinds={BOOLEAN,BYTE,CHAR,DOUBLE,FLOAT,INT,LONG,SHORT}) public @interface Interned
To specify that all objects of a given type are interned, annotate the class declaration:
public @Interned class MyInternedClass { ... }This is equivalent to annotating every use of MyInternedClass, in a declaration or elsewhere. For example, enum classes are implicitly so annotated.
InterningChecker