new Reflections( new AbstractConfiguration() { { setFilter(new FilterBuilder().include("your project's common package prefix here...")); setUrls(ClasspathHelper.getUrlsForCurrentClasspath()); setScanners(new SubTypesScanner(), new ClassAnnotationsScanner().filterBy(myClassAnnotationsFilter)); )); } });and than use the convenient methods to query the metadata, such as {@link #getSubTypesOf}, {@link #getTypesAnnotatedWith}, {@link #getMethodsAnnotatedWith}
another usage of Reflections is to collect pre saved metadata xml, using {@link #collect()} and {@link #collect(String,com.google.common.base.Predicate)}. in order to save a Reflections instance metadata use {@link #save(String)}
|
|