io.swagger.jaxrs.config.DefaultReaderConfig 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 io.swagger.jaxrs.config;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
/**
* The ReaderConfig
interface defines configuration settings for
* JAX-RS annotations reader.
*/
public class DefaultReaderConfig implements ReaderConfig {
private boolean scanAllResources;
private Collection ignoredRoutes = Collections.emptySet();
/**
* Creates default configuration.
*/
public DefaultReaderConfig() {
}
/**
* Creates a copy of passed configuration.
*/
public DefaultReaderConfig(ReaderConfig src) {
if (src == null) {
return;
}
setScanAllResources(src.isScanAllResources());
setIgnoredRoutes(src.getIgnoredRoutes());
}
@Override
public boolean isScanAllResources() {
return scanAllResources;
}
public void setScanAllResources(boolean scanAllResources) {
this.scanAllResources = scanAllResources;
}
@Override
public Collection getIgnoredRoutes() {
return ignoredRoutes;
}
public void setIgnoredRoutes(Collection ignoredRoutes) {
this.ignoredRoutes = ignoredRoutes == null || ignoredRoutes.isEmpty() ? Collections.emptySet()
: Collections.unmodifiableCollection(new HashSet(ignoredRoutes));
}
}