com.github.robindevilliers.cascade.modules.scanner.ReflectionsClasspathScanner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cascade Show documentation
Show all versions of cascade Show documentation
Cascade is a blackbox testing framework
The newest version!
package com.github.robindevilliers.cascade.modules.scanner;
import com.github.robindevilliers.cascade.modules.ClasspathScanner;
import org.reflections.Reflections;
import java.lang.annotation.Annotation;
import java.util.Set;
public class ReflectionsClasspathScanner implements ClasspathScanner {
private Reflections reflections;
@Override
public void initialise(String path) {
reflections = new Reflections(path);
}
@Override
public Set> getTypesAnnotatedWith(final Class extends Annotation> annotation) {
return reflections.getTypesAnnotatedWith(annotation);
}
@Override
public Set getSubTypesOf(Class type) {
return reflections.getSubTypesOf(type);
}
}