How to change annotation value at runtime using reflection?

The following is an annotation.

@Before(value="execution(* class.method(**)")

Is it possible to change the annotation value of a single value using java reflection?

Please offer.

+2
source share
1 answer

A description of what you are looking for can be found here . But be careful when using this approach, some of its reservations are also described.

In addition, the annotation retention policy must have a runtime for this.

, , , , JPA/Hibernate, - .

+2

Source: https://habr.com/ru/post/1569359/


All Articles