Rom*_*man 6 java annotations jls
public @interface InnerAnnotation {
String value() default "hello";
}
public @interface OuterAnnotation {
InnerAnnotation value() default ???
}
Run Code Online (Sandbox Code Playgroud)
还有一种情况:
public @interface AnotherOuterAnnotation {
InnerAnnotation[] value() default ??? UPD: {}
}
Run Code Online (Sandbox Code Playgroud)
Per*_*ion 10
是的,它可能:
public @interface InnerAnnotation {
String value() default "hello";
}
public @interface OuterAnnotation {
InnerAnnotation value() default @InnerAnnotation(value = "Goodbye");
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1013 次 |
| 最近记录: |