@Documented @Retention(value=RUNTIME) @Target(value={TYPE_USE,TYPE_PARAMETER,METHOD}) public @interface LengthOf
This is treated as an IndexOrHigh
annotation internally. This is an implementation
detail that may change in the future, when this type may be used to implement more precise
refinements.
The usual use case for the LengthOf
annotation is in the defintions of custom
collections. Consider the signature of java.lang.String#length():
public @LengthOf("this") int length()
public abstract String[] value