Annotation Interface CalledMethods


If an expression has type @CalledMethods({"m1", "m2"}), then methods m1 and m2 have definitely been called on its value. Other methods might or might not have been called. "Been called" is defined as having been invoked: a method has "been called" even if it might never return or might throw an exception.

The subtyping relationship is:

@CalledMethods({"m1", "m2", "m3"}) <: @CalledMethods({"m1", "m2"})
See the Checker Framework Manual:
Called Methods Checker
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Methods that have definitely been called on the expression whose type is annotated.
  • Element Details

    • value

      String[] value
      Methods that have definitely been called on the expression whose type is annotated.
      Returns:
      methods that have definitely been called
      Default:
      {}