ClassFinder { public static <T> Set<Class<? extends T>> findClasses(Class<T> baseClass) { return findClassesFromLoader(null, baseClass); }  static ThreadLocalStack<ServletContext> getThreadDefaultServletContext(); static ThreadLocalStack<ClassFinder> getThreadDefault(); @SuppressWarnings("unchecked") static Set<Class<? extends T>> findClassesFromLoader(ClassLoader loader, Class<T> baseClass); static Set<Class<? extends T>> findClasses(Class<T> baseClass); static Set<Class<? extends T>> findConcreteClasses(Class<T> baseClass); Set<String> getClassLoaderExclusions(); void setClassLoaderExclusions(Set<String> classLoaderExclusions); Set<Class<? extends T>> find(ClassLoader loader, Class<T> baseClass); static final String INCLUDE_ATTRIBUTE; }
@Test public void findClasses() { assertThat( ClassFinder.findClasses(Interface.class), is(ImmutableSet.of( AbstractClass.class, ConcreteInterface.class, ConcreteClass.class ))); }