/** * Check for the resteasy builtin JAXBContext implementation. * @param type * @param annotations * @param mediaType * @return * @throws IOException */ private JAXBContext getJAXBContextFinder(Class<Object> type, Annotation[] annotations, MediaType mediaType) throws IOException { try { LogMessages.LOGGER.debugf("Provider : %s, Method : getJAXBContextFinder", getClass().getName()); ContextResolver<JAXBContextFinder> resolver = providers.getContextResolver(JAXBContextFinder.class, mediaType); JAXBContextFinder finder = resolver.getContext(type); if (finder == null) { throw new JAXBUnmarshalException(Messages.MESSAGES.couldNotFindJAXBContextFinder(mediaType)); } JAXBContext jaxb = finder.findCacheXmlTypeContext(mediaType, annotations, type); return jaxb; } catch (JAXBException e) { throw new JAXBUnmarshalException(e); } }