Top Description Methods
org.checkerframework.checker.index.qual

public @Interface IndexOrLow

extends Annotation
Annotations
@Documented
@Retention:RUNTIME
@Target:TYPE_USE, TYPE_PARAMETER
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target

An integer that is either -1 or is a valid index for each of the given sequences.

The String.indexOf(String) method is declared as


  class String {
   @IndexOrLow("this") int indexOf(String str) { ... }
  }

Writing @IndexOrLow("arr") is equivalent to writing @GTENegativeOne @LTLengthOf("arr"), and that is how it is treated internally by the checker. Thus, if you write an @IndexOrLow("arr") annotation, you might see warnings about @GTENegativeOne or @LTLengthOf.

See Also
GTENegativeOne, LTLengthOf

Method Summary

Modifier and TypeMethod and Description
public String[]
value()

Sequences that the annotated expression is a valid index for (or it's -1).

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String[] value()

Sequences that the annotated expression is a valid index for (or it's -1).