Annotation Type SearchIndexFor


  • @Documented
    @Retention(RUNTIME)
    @Target({TYPE_USE,TYPE_PARAMETER})
    @SubtypeOf(SearchIndexUnknown.class)
    public @interface SearchIndexFor
    The annotated expression evaluates to an integer whose length is between -a.length - 1 and a.length - 1, inclusive, for all sequences a listed in the annotation.

    This is the return type of Arrays.binarySearch in the JDK.

    See the Checker Framework Manual:
    Index Checker
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String[] value
      Sequences for which the annotated expression has the type of the result of a call to Arrays.binarySearch.
    • Element Detail

      • value

        @JavaExpression
        java.lang.String[] value
        Sequences for which the annotated expression has the type of the result of a call to Arrays.binarySearch.