Class ContextFactory


  • public class ContextFactory
    extends Object
    This class is responsible for producing RI JAXBContext objects. In the RI, this is the class that the javax.xml.bind.context.factory property will point to.

    Used to create JAXBContext objects for v1.0.1 and forward

    Since:
    2.0
    Author:
    Kohsuke Kawaguchi
    • Constructor Detail

      • ContextFactory

        public ContextFactory()
    • Method Detail

      • createContext

        public static javax.xml.bind.JAXBContext createContext​(Class[] classes,
                                                               Map<String,​Object> properties)
                                                        throws javax.xml.bind.JAXBException
        The API will invoke this method via reflection
        Throws:
        javax.xml.bind.JAXBException
      • createContext

        @Deprecated
        public static JAXBRIContext createContext​(Class[] classes,
                                                  Collection<TypeReference> typeRefs,
                                                  Map<Class,​Class> subclassReplacements,
                                                  String defaultNsUri,
                                                  boolean c14nSupport,
                                                  RuntimeAnnotationReader ar,
                                                  boolean xmlAccessorFactorySupport,
                                                  boolean allNillable,
                                                  boolean retainPropertyInfo)
                                           throws javax.xml.bind.JAXBException
        Deprecated.
        use createContext(Class[] classes, Map<String,Object> properties) method instead
        Parameters:
        classes -
        typeRefs -
        subclassReplacements -
        defaultNsUri -
        c14nSupport -
        ar -
        xmlAccessorFactorySupport -
        allNillable -
        retainPropertyInfo -
        Returns:
        Throws:
        javax.xml.bind.JAXBException
      • createContext

        @Deprecated
        public static JAXBRIContext createContext​(Class[] classes,
                                                  Collection<TypeReference> typeRefs,
                                                  Map<Class,​Class> subclassReplacements,
                                                  String defaultNsUri,
                                                  boolean c14nSupport,
                                                  RuntimeAnnotationReader ar,
                                                  boolean xmlAccessorFactorySupport,
                                                  boolean allNillable,
                                                  boolean retainPropertyInfo,
                                                  boolean improvedXsiTypeHandling)
                                           throws javax.xml.bind.JAXBException
        Deprecated.
        use createContext( Class[] classes, Map<String,Object> properties) method instead
        Parameters:
        classes -
        typeRefs -
        subclassReplacements -
        defaultNsUri -
        c14nSupport -
        ar -
        xmlAccessorFactorySupport -
        allNillable -
        retainPropertyInfo -
        improvedXsiTypeHandling -
        Returns:
        Throws:
        javax.xml.bind.JAXBException
      • createContext

        public static javax.xml.bind.JAXBContext createContext​(String contextPath,
                                                               ClassLoader classLoader,
                                                               Map<String,​Object> properties)
                                                        throws javax.xml.bind.JAXBException
        The API will invoke this method via reflection.
        Throws:
        javax.xml.bind.JAXBException