Class JAXBContextFactory

  • All Implemented Interfaces:
    jakarta.xml.bind.JAXBContextFactory

    public class JAXBContextFactory
    extends Object
    implements jakarta.xml.bind.JAXBContextFactory
    Creates JAXB context. Context factory supporting JavaSE service loading facilities. Redirects to ContextFactory, which is not removed due to compatibility reasons.
    • Constructor Detail

      • JAXBContextFactory

        public JAXBContextFactory()
    • Method Detail

      • createContext

        public jakarta.xml.bind.JAXBContext createContext​(Class<?>[] classesToBeBound,
                                                          Map<String,​?> properties)
                                                   throws jakarta.xml.bind.JAXBException
        Creates JAXB context.
        Specified by:
        createContext in interface jakarta.xml.bind.JAXBContextFactory
        Parameters:
        classesToBeBound - JAXB classes accessed by runtime.
        properties - JAXB properties passed to runtime.
        Returns:
        JAXB context.
        Throws:
        jakarta.xml.bind.JAXBException - on any error.
      • createContext

        public jakarta.xml.bind.JAXBContext createContext​(String contextPath,
                                                          ClassLoader classLoader,
                                                          Map<String,​?> properties)
                                                   throws jakarta.xml.bind.JAXBException
        Creates JAXB context.
        Specified by:
        createContext in interface jakarta.xml.bind.JAXBContextFactory
        Parameters:
        contextPath - path to scan for JAXB classes accessed by runtime.
        classLoader - class loader to use.
        properties - JAXB properties.
        Returns:
        JAXB context.
        Throws:
        jakarta.xml.bind.JAXBException - on any error.