Search in sources :

Example 41 with SubTypesScanner

use of org.reflections.scanners.SubTypesScanner in project oc-explorer by devgateway.

the class ReflectionsConfiguration method reflections.

@Bean
public Reflections reflections() {
    logger.debug("Starting reflections scanners...");
    Reflections reflections = new Reflections(new ConfigurationBuilder().setUrls(ClasspathHelper.forPackage("org.devgateway.ocds.persistence.mongo")).setScanners(new SubTypesScanner(), new FieldAnnotationsScanner(), new MethodParameterScanner()));
    logger.debug("Configured reflections bean.");
    return reflections;
}
Also used : MethodParameterScanner(org.reflections.scanners.MethodParameterScanner) ConfigurationBuilder(org.reflections.util.ConfigurationBuilder) FieldAnnotationsScanner(org.reflections.scanners.FieldAnnotationsScanner) SubTypesScanner(org.reflections.scanners.SubTypesScanner) Reflections(org.reflections.Reflections) Bean(org.springframework.context.annotation.Bean)

Aggregations

Reflections (org.reflections.Reflections)41 SubTypesScanner (org.reflections.scanners.SubTypesScanner)41 ConfigurationBuilder (org.reflections.util.ConfigurationBuilder)29 TypeAnnotationsScanner (org.reflections.scanners.TypeAnnotationsScanner)18 HashSet (java.util.HashSet)9 FilterBuilder (org.reflections.util.FilterBuilder)9 ResourcesScanner (org.reflections.scanners.ResourcesScanner)8 URL (java.net.URL)7 ArrayList (java.util.ArrayList)7 FieldAnnotationsScanner (org.reflections.scanners.FieldAnnotationsScanner)6 Set (java.util.Set)5 Collectors (java.util.stream.Collectors)5 File (java.io.File)4 List (java.util.List)4 Bean (org.springframework.context.annotation.Bean)4 HashMap (java.util.HashMap)3 Slf4j (lombok.extern.slf4j.Slf4j)3 MethodAnnotationsScanner (org.reflections.scanners.MethodAnnotationsScanner)3 MethodParameterScanner (org.reflections.scanners.MethodParameterScanner)3 IOException (java.io.IOException)2