@Documented @Retention(value=RUNTIME) @Target(value={TYPE_USE,TYPE_PARAMETER}) @SubtypeOf(value=MaybeAliased.class) @DefaultFor(value=LOWER_BOUND) public @interface Unique
A constructor's return type should be annotated with @Unique
if the
constructor does not leak references to the constructed object.
For example, the String()
constructor return type
is annotated as @Unique
.
MaybeAliased