Class XmlJAXBContextFinder

    • Constructor Detail

      • XmlJAXBContextFinder

        public XmlJAXBContextFinder()
    • Method Detail

      • findCachedContext

        public jakarta.xml.bind.JAXBContext findCachedContext​(Class type,
                                                              jakarta.ws.rs.core.MediaType mediaType,
                                                              Annotation[] parameterAnnotations)
                                                       throws jakarta.xml.bind.JAXBException
        Description copied from interface: JAXBContextFinder
        This method with find a JAXBContext for one type. The user can override the cache by defining a ContextResolver<JAXBContext> for the given media type.
        Specified by:
        findCachedContext in interface JAXBContextFinder
        Parameters:
        type - type
        mediaType - media type
        parameterAnnotations - annotations
        Returns:
        JAXBContext
        Throws:
        jakarta.xml.bind.JAXBException - jaxb exception
      • findCacheContext

        public jakarta.xml.bind.JAXBContext findCacheContext​(jakarta.ws.rs.core.MediaType mediaType,
                                                             Annotation[] paraAnnotations,
                                                             Class... classes)
                                                      throws jakarta.xml.bind.JAXBException
        Description copied from interface: JAXBContextFinder
        This method creates a JAXBContext from a collection of classes. Unlike the other findCachedContext() method, the user cannot override the JAXBContext created.
        Specified by:
        findCacheContext in interface JAXBContextFinder
        Parameters:
        mediaType - media type
        paraAnnotations - annotations
        classes - classes
        Returns:
        JAXBContext
        Throws:
        jakarta.xml.bind.JAXBException - jaxb exception
      • findCacheXmlTypeContext

        public jakarta.xml.bind.JAXBContext findCacheXmlTypeContext​(jakarta.ws.rs.core.MediaType mediaType,
                                                                    Annotation[] paraAnnotations,
                                                                    Class... classes)
                                                             throws jakarta.xml.bind.JAXBException
        Description copied from interface: JAXBContextFinder
        This method will find a JAXBContext from a set of XmlTypes that use an ObjectFactory for creation (i.e. from xjc).
        Specified by:
        findCacheXmlTypeContext in interface JAXBContextFinder
        Parameters:
        mediaType - media type
        paraAnnotations - annotations
        classes - classes
        Returns:
        JAXBContext
        Throws:
        jakarta.xml.bind.JAXBException - jaxb exception