1
나는 두 가지 방법
public class Question {
@AnnotationA(value = { @AnnotationB(message = "One"), @AnnotationB(message = "Two") })
public int methodOne() {
return 1;
}
@AnnotationA(value = { @AnnotationB(message = "One"), @AnnotationB(message = "Two") })
public int methodTwo() {
return 2;
}
}
내가
public class Question {
@AnnotationA(value = annoArray)
public int methodOne() {
return 1;
}
@AnnotationA(value = annoArray)
public int methodTwo() {
return 2;
}
public AnnotationB[] annoArray = { @AnnotationB(message = "One"), @AnnotationB(message = "Two") }
}
을 쓸 수 있도록하고 싶습니다하지만 난의 위치에 Annotations are not allowed here
것을 IntelliJ에 의해 통보하고에 주석을
annoArray
.
다른 방법이 있습니까?