@FunctionalInterface アノテーションを付与できるインターフェースを報告します。

インターフェースに @FunctionalInterface アノテーションを付与すると、そのインターフェースが関数型であり、これ以上 abstract メソッドを追加できないことを伝えることができます。

例:


  interface FileProcessor {
    void execute(File file);
  }

クイックフィックス適用後:


  @FunctionalInterface
  interface FileProcessor {
    void execute(File file);
  }