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

com.sun.xml.bind.v2.JAXBContextFactory Maven / Gradle / Ivy

There is a newer version: 10.0.0-M3
Show newest version
package com.sun.xml.bind.v2;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import java.util.Map;

/**
 * Creates JAXB context.
 * Context factory supporting JavaSE service loading facilities.
 *
 * Redirects to {@link ContextFactory}, which is not removed due to compatibility reasons.
 */
public class JAXBContextFactory implements javax.xml.bind.JAXBContextFactory {

    /**
     * Creates JAXB context.
     *
     * @param classesToBeBound JAXB classes accessed by runtime.
     * @param properties JAXB properties passed to runtime.
     * @return JAXB context.
     * @throws JAXBException on any error.
     */
    @Override
    public JAXBContext createContext(Class[] classesToBeBound, Map properties) throws JAXBException {
        return ContextFactory.createContext(classesToBeBound, (Map) properties);
    }

    /**
     * Creates JAXB context.
     * @param contextPath path to scan for JAXB classes accessed by runtime.
     * @param classLoader class loader to use.
     * @param properties JAXB properties.
     * @return JAXB context.
     * @throws JAXBException on any error.
     */
    @Override
    public JAXBContext createContext(String contextPath, ClassLoader classLoader, Map properties) throws JAXBException {
        return ContextFactory.createContext(contextPath, classLoader, (Map) properties);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy