Is it possible to set properties of annotation programmatically. So if I have :
@interface Author(
String name();
Date date ();
)
I want to be able to set the name property inside the code as if it is a regular class. Is this possible?
Is it possible to set properties of annotation programmatically. So if I have :
@interface Author(
String name();
Date date ();
)
I want to be able to set the name property inside the code as if it is a regular class. Is this possible?
Date在注释中使用@Retention(RetentionPolicy.RUNTIME)保留策略{}注释定义,而不是()为什么要在运行时执行此操作?可能还有其他更好的解决方案来解决您的问题。