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

be.selckin.ws.util.java2php.JaxbUtils Maven / Gradle / Ivy

package be.selckin.ws.util.java2php;

import org.reflections.Reflections;

import javax.xml.bind.annotation.XmlRootElement;
import java.util.Set;

public class JaxbUtils {
    private JaxbUtils() {
    }

    public static final String PROP_EXTRA_CLASSES = "jaxb.additionalContextClasses";

    public static Class[] findExtraClasses(Class type) {
        String prefix = type.getPackage().getName();
        Reflections reflections = new Reflections(prefix);
        Set> extraClasses = reflections.getTypesAnnotatedWith(XmlRootElement.class);
        return extraClasses.toArray(new Class[extraClasses.size()]);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy