All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.robindevilliers.cascade.modules.scanner.ReflectionsClasspathScanner Maven / Gradle / Ivy

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 annotation) {
        return reflections.getTypesAnnotatedWith(annotation);
    }

    @Override
    public Set getSubTypesOf(Class type) {
        return reflections.getSubTypesOf(type);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy