I want to get a complete list of classes in the application which are annotated with @Custom annotation. What is the best mechanism for this operation?
I know this is an old question, but I ran across it in my own search for classpath scanning and found another good answer, so I'm adding it here.
Google Guava has a ClassPath object that provides "best effort" classpath scanning (which is all any classpath scanning utility offers, really). Since Guava is a widely-adopted, carefully-maintained utility library, this is a great option for projects that either (a) are already using Guava, or (b) need a stable library they can rely on for classpath scanning.