@Repeatable
같은 애너테이션을 여러 번 사용할 수 있도록 허용한다.
Java 8부터 도입되었습니다.
import java.lang.annotation.Repeatable;
@Repeatable(MyAnnotations.class)
@interface MyAnnotation {
// 애너테이션 내용
}
@interface MyAnnotations {
MyAnnotation[] value();
}'JAVA' 카테고리의 다른 글
| 스레드 구현과 실행 + 싱글쓰레드와 멀티쓰레드: start()와 run() (0) | 2024.02.19 |
|---|---|
| @interface 나만의 애너테이션 만들기 (0) | 2024.02.15 |
| Annotation - @Retention (0) | 2024.02.15 |
| Annotation - @Inherited (0) | 2024.02.15 |
| Annotation - @Documented (0) | 2024.02.15 |