org.reflections.scanners.ResourcesScanner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swagger-all Show documentation
Show all versions of swagger-all Show documentation
swagger-all is a rebundled verison of Swagger as one OSGi bundle.
The newest version!
package org.reflections.scanners;
import org.reflections.vfs.Vfs;
/** collects all resources that are not classes in a collection
* key: value - {web.xml: WEB-INF/web.xml} */
public class ResourcesScanner extends AbstractScanner {
public boolean acceptsInput(String file) {
return !file.endsWith(".class"); //not a class
}
@Override public Object scan(Vfs.File file, Object classObject) {
getStore().put(file.getName(), file.getRelativePath());
return classObject;
}
public void scan(Object cls) {
throw new UnsupportedOperationException(); //shouldn't get here
}
}