And another solution is Google reflections.
Quick review:
- Spring solution is the way to go if you're using Spring. Otherwise it's a big dependency.
- Using ASM directly is a bit cumbersome.
- Using Java Assist directly is clunky too.
- Annovention is super lightweight and convenient. No maven integration yet.
- Google reflections pulls in Google collections. Indexes everything and then is super fast.