I want to do the following using Google Reflections:
Scan only WEB-INF/lib/Patrac-ejb.jar
Scan only the package com.patrac and all of its sub-packages.
Scan for only type- and method annotations.
The following configuration seems to work fine but I don't have any experience with Google Reflections.
Reflections reflections = new Reflections(
new ConfigurationBuilder()
.filterInputsBy(new FilterBuilder().include("Patrac-ejb.jar").include(FilterBuilder.prefix("com.patrac")))
.setScanners(new MethodAnnotationsScanner(), new TypeAnnotationsScanner())
.setUrls(ClasspathHelper.forWebInfLib(servletContext))
);
It appears to be working. I want to make sure it's not scanning all the other JARs in WEB-INF/lib. Is there an easy way to discover what JARs are being matched by the filter inputs in the configuration? Any advice about my approach would be much appreciated.