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

io.swagger.jaxrs2.integration.JaxrsApplicationAndAnnotationScanner Maven / Gradle / Ivy

The newest version!
package io.swagger.jaxrs2.integration;

import java.util.HashSet;
import java.util.Set;

public class JaxrsApplicationAndAnnotationScanner extends JaxrsAnnotationScanner {


    @Override
    public Set> classes() {
        Set> classes = super.classes();
        Set> output = new HashSet>();
        if (application != null) {
            Set> clz = application.getClasses();
            if (clz != null) {
                output.addAll(clz);
            }
            Set singletons = application.getSingletons();
            if (singletons != null) {
                for (Object o : singletons) {
                    output.add(o.getClass());
                }
            }
        }
        classes.addAll(output);
        return classes;
    }

}