Class XmlJAXBContextFinder
java.lang.Object
org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBContextFinder
org.jboss.resteasy.plugins.providers.jaxb.XmlJAXBContextFinder
- All Implemented Interfaces:
jakarta.ws.rs.ext.ContextResolver<JAXBContextFinder>
,JAXBContextFinder
- Direct Known Subclasses:
FastinfoSetJAXBContextFinder
@Provider
@Produces({"text/xml","text/*+xml","application/xml","application/*+xml"})
public class XmlJAXBContextFinder
extends AbstractJAXBContextFinder
implements jakarta.ws.rs.ext.ContextResolver<JAXBContextFinder>
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBContextFinder
AbstractJAXBContextFinder.CacheKey
-
Field Summary
Fields inherited from class org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBContextFinder
OBJECT_FACTORY_NAME, providers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected jakarta.xml.bind.JAXBContext
createContextObject
(Annotation[] parameterAnnotations, Class... classes) protected jakarta.xml.bind.JAXBContext
createContextObject
(Annotation[] parameterAnnotations, String contextPath) jakarta.xml.bind.JAXBContext
findCacheContext
(jakarta.ws.rs.core.MediaType mediaType, Annotation[] paraAnnotations, Class... classes) This method creates a JAXBContext from a collection of classes.jakarta.xml.bind.JAXBContext
findCachedContext
(Class type, jakarta.ws.rs.core.MediaType mediaType, Annotation[] parameterAnnotations) This method with find a JAXBContext for one type.jakarta.xml.bind.JAXBContext
findCacheXmlTypeContext
(jakarta.ws.rs.core.MediaType mediaType, Annotation[] paraAnnotations, Class... classes) This method will find a JAXBContext from a set of XmlTypes that use an ObjectFactory for creation (i.e.Methods inherited from class org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBContextFinder
createContext, createXmlTypeContext, findDefaultObjectFactoryClass, findProvidedJAXBContext, getContext, getPackageName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.ws.rs.ext.ContextResolver
getContext
-
Constructor Details
-
XmlJAXBContextFinder
public XmlJAXBContextFinder()
-
-
Method Details
-
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 interfaceJAXBContextFinder
- Parameters:
type
- typemediaType
- media typeparameterAnnotations
- annotations- Returns:
JAXBContext
- Throws:
jakarta.xml.bind.JAXBException
- jaxb exception
-
createContextObject
protected jakarta.xml.bind.JAXBContext createContextObject(Annotation[] parameterAnnotations, Class... classes) throws jakarta.xml.bind.JAXBException - Specified by:
createContextObject
in classAbstractJAXBContextFinder
- Throws:
jakarta.xml.bind.JAXBException
-
createContextObject
protected jakarta.xml.bind.JAXBContext createContextObject(Annotation[] parameterAnnotations, String contextPath) throws jakarta.xml.bind.JAXBException - Specified by:
createContextObject
in classAbstractJAXBContextFinder
- Throws:
jakarta.xml.bind.JAXBException
-
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 interfaceJAXBContextFinder
- Parameters:
mediaType
- media typeparaAnnotations
- annotationsclasses
- 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 interfaceJAXBContextFinder
- Parameters:
mediaType
- media typeparaAnnotations
- annotationsclasses
- classes- Returns:
JAXBContext
- Throws:
jakarta.xml.bind.JAXBException
- jaxb exception
-