@FunctionalInterface 어노테이션을 추가할 수 있는 인터페이스를 보고합니다.

인터페이스에 @FunctionalInterface 어노테이션을 추가하는 것은 인터페이스가 함수형이며 더 이상 abstract 메서드를 추가할 수 없음을 의미합니다.

예:


  interface FileProcessor {
    void execute(File file);
  }

빠른 수정을 적용한 후:


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