This is not possible to do using only the built-in Java Reflections API.
A project exists that does the necessary scanning and indexing of your classpath so you can get access this information...
A Java runtime metadata analysis, in the spirit of Scannotations
Reflections scans your classpath, indexes the metadata, allows you to query it on runtime and may save and collect that information for many modules within your project.
Using Reflections you can query your metadata for:
· get all subtypes of some type
· get all types annotated with some annotation
· get all types annotated with some annotation, including annotation parameters matching
· get all methods annotated with some
Source : Stackoverflow