@Provider public class JaxbContextResolver extends Object implements javax.ws.rs.ext.ContextResolver<JAXBContext>
| Modifier and Type | Field and Description |
|---|---|
protected Map<Class<?>,JAXBContext> |
classContexts |
protected Map<String,Object> |
contextProperties |
protected Class<?>[] |
extraClass |
protected Map<String,JAXBContext> |
packageContexts |
| Constructor and Description |
|---|
JaxbContextResolver() |
| Modifier and Type | Method and Description |
|---|---|
protected JAXBContext |
getClassContext(Class<?> type) |
JAXBContext |
getContext(Class<?> type) |
JAXBContext |
getJAXBContext(Class<?> type) |
protected JAXBContext |
getPackageContext(Class<?> type) |
static String |
getPackageName(Class<?> clazz) |
protected boolean |
objectFactoryOrIndexAvailable(Class<?> type) |
void |
setContextProperties(Map<String,Object> contextProperties) |
void |
setExtraClass(Class<?>[] extraClass) |
protected final Map<String,JAXBContext> packageContexts
protected final Map<Class<?>,JAXBContext> classContexts
protected Class<?>[] extraClass
public void setExtraClass(Class<?>[] extraClass)
public JAXBContext getContext(Class<?> type)
getContext in interface javax.ws.rs.ext.ContextResolver<JAXBContext>public JAXBContext getJAXBContext(Class<?> type) throws JAXBException
JAXBExceptionprotected JAXBContext getClassContext(Class<?> type) throws JAXBException
JAXBExceptionprotected JAXBContext getPackageContext(Class<?> type) throws JAXBException
JAXBExceptionprotected boolean objectFactoryOrIndexAvailable(Class<?> type)
Copyright © 2020. All rights reserved.