Modify a method annotation parameter at runtime

后端 未结 1 1041
无人共我
无人共我 2021-01-02 21:33

I found this thread: How to change annotation value at runtime using reflection?

And I\'m trying to change method annotation, but java.lang.reflect.Method does not c

相关标签:
1条回答
  • 2021-01-02 22:09

    I wrote a class AnnotationUtil to resolve the seris requirements.

    It can add/remove/change annotation value on class/field/method instance.

    Note that use ReflectUtil to get root field/method when add/remove annotation.

    See it on github:

    AnnotationUtil

    ReflectUtil

    0 讨论(0)
提交回复
热议问题