You cannot read data annotation with reflection because it has a default hold ( CLASS ).
You can try to use some heuristics, for example, check that it contains the following methods:
public final copypublic final component{N}public static copy$default
But note that some of them are implementation details and are subject to change in the future.
bashor
source share