报告方法 @Contract 注解中的问题。 可以报告的问题类型有:

示例:


  // 方法没有参数,但约定预期 1
  @Contract("_ -> fail")
  void x() {
    throw new AssertionError();
  }