@Test public void testFindByPackage() { Collection<Class<?>> services = serviceProvider.findClass(FlipContext.class); assertTrue(services.contains(TestContextProvider.class)); assertFalse(services.contains(Test1ContextProvider.class)); }
protected Collection<Class<?>> findClass(final Class<? extends Annotation> annotationClass) { return reflections.getTypesAnnotatedWith(annotationClass); }
ServiceProvider { protected Collection<Class<?>> findClass(final Class<? extends Annotation> annotationClass) { return reflections.getTypesAnnotatedWith(annotationClass); } }
ServiceProvider { protected Collection<Class<?>> findClass(final Class<? extends Annotation> annotationClass) { return reflections.getTypesAnnotatedWith(annotationClass); } ServiceProvider(final String... pkgs); }
ServiceProvider { protected Collection<Class<?>> findClass(final Class<? extends Annotation> annotationClass) { return reflections.getTypesAnnotatedWith(annotationClass); } ServiceProvider(final String... pkgs); Collection<Object> find(final Class<? extends Annotation> annotatedClass); Collection<T> find(final Class<? extends Annotation> annotatedClass, final Class<T> resultingClass); }
ServiceProvider { protected Collection<Class<?>> findClass(final Class<? extends Annotation> annotationClass) { return reflections.getTypesAnnotatedWith(annotationClass); } ServiceProvider(final String... pkgs); Collection<Object> find(final Class<? extends Annotation> annotatedClass); Collection<T> find(final Class<? extends Annotation> annotatedClass, final Class<T> resultingClass);  }