Annotation Interface Method.Calls

Enclosing class:
Method

@Retention(RUNTIME) @Target(METHOD) public static @interface Method.Calls
Matches calls with the given name made on the value after it was built.

A boolean return reports whether any were made, a List collects every match, and any other type takes the last one. Add Argument.Index to read one of the call's arguments rather than the call itself.

// palette.add(red); palette.add(blue);
@Method.Calls("add")
@Argument.Index(0)
List<Color> colors();
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name of the calls to match.
  • Element Details

    • value

      String value
      The name of the calls to match.
      Returns:
      the method name