Created
February 14, 2012 07:21
-
-
Save xsalefter/1824474 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Result: [class com.thermetics.bug.classes.TestClass] | |
| public class Program { | |
| public static void main(String[] args) { | |
| Set<URL> urls = new HashSet<URL>(); | |
| // Change this in ur favor.. | |
| urls.addAll(ClasspathHelper.forPackage("com.thermetics.bug")); | |
| urls.add(ClasspathHelper.forClass(TestAnnotation.class)); | |
| ConfigurationBuilder builder = new ConfigurationBuilder(). | |
| addUrls(urls); | |
| Reflections r = new Reflections(builder); | |
| Set<Class<?>> types = r.getTypesAnnotatedWith(TestAnnotation.class); | |
| System.out.println(types); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment