org.apache.cxf.jaxrs.provider
Class AbstractJAXBProvider
java.lang.Object
org.apache.cxf.jaxrs.provider.AbstractConfigurableProvider
org.apache.cxf.jaxrs.provider.AbstractJAXBProvider
- All Implemented Interfaces:
- javax.ws.rs.ext.MessageBodyReader<java.lang.Object>, javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
- Direct Known Subclasses:
- JAXBElementProvider, JSONProvider
public abstract class AbstractJAXBProvider
- extends AbstractConfigurableProvider
- implements javax.ws.rs.ext.MessageBodyReader<java.lang.Object>, javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
Field Summary |
protected static java.util.ResourceBundle |
BUNDLE
|
Method Summary |
protected boolean |
adapterAvailable(java.lang.Class<?> type,
java.lang.annotation.Annotation[] anns)
|
protected java.lang.Object |
checkAdapter(java.lang.Object obj,
java.lang.annotation.Annotation[] anns,
boolean marshal)
|
protected javax.xml.bind.Marshaller |
createMarshaller(java.lang.Object obj,
java.lang.Class<?> cls,
java.lang.reflect.Type genericType,
javax.ws.rs.core.MediaType m)
|
protected javax.xml.bind.Unmarshaller |
createUnmarshaller(java.lang.Class<?> cls,
java.lang.reflect.Type genericType)
|
protected java.lang.Class<?> |
getActualType(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] anns)
|
protected javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter |
getAdapter(java.lang.Class<?> type,
java.lang.annotation.Annotation[] anns)
|
javax.xml.bind.JAXBContext |
getClassContext(java.lang.Class<?> type)
|
protected MessageContext |
getContext()
|
protected javax.xml.bind.JAXBContext |
getJAXBContext(java.lang.Class<?> type,
java.lang.reflect.Type genericType)
|
javax.xml.bind.JAXBContext |
getPackageContext(java.lang.Class<?> type)
|
protected javax.xml.validation.Schema |
getSchema()
|
long |
getSize(java.lang.Object o)
|
protected static void |
handleJAXBException(javax.xml.bind.JAXBException e)
|
boolean |
isReadable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations)
|
protected boolean |
isSupported(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] anns)
|
boolean |
isWriteable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] anns)
|
protected boolean |
objectFactoryForClass(java.lang.Class<?> type)
|
protected void |
setContext(MessageContext context)
|
void |
setSchema(javax.xml.validation.Schema s)
|
void |
setSchemaLocations(java.util.List<java.lang.String> locations)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.ws.rs.ext.MessageBodyReader |
readFrom |
Methods inherited from interface javax.ws.rs.ext.MessageBodyWriter |
writeTo |
BUNDLE
protected static final java.util.ResourceBundle BUNDLE
AbstractJAXBProvider
public AbstractJAXBProvider()
setContext
protected void setContext(MessageContext context)
isWriteable
public boolean isWriteable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] anns)
- Specified by:
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
isReadable
public boolean isReadable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations)
- Specified by:
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<java.lang.Object>
setSchemaLocations
public void setSchemaLocations(java.util.List<java.lang.String> locations)
getSize
public long getSize(java.lang.Object o)
- Specified by:
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<java.lang.Object>
setSchema
public void setSchema(javax.xml.validation.Schema s)
getContext
protected MessageContext getContext()
getJAXBContext
protected javax.xml.bind.JAXBContext getJAXBContext(java.lang.Class<?> type,
java.lang.reflect.Type genericType)
throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
getClassContext
public javax.xml.bind.JAXBContext getClassContext(java.lang.Class<?> type)
throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
getPackageContext
public javax.xml.bind.JAXBContext getPackageContext(java.lang.Class<?> type)
isSupported
protected boolean isSupported(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] anns)
adapterAvailable
protected boolean adapterAvailable(java.lang.Class<?> type,
java.lang.annotation.Annotation[] anns)
objectFactoryForClass
protected boolean objectFactoryForClass(java.lang.Class<?> type)
createUnmarshaller
protected javax.xml.bind.Unmarshaller createUnmarshaller(java.lang.Class<?> cls,
java.lang.reflect.Type genericType)
throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
createMarshaller
protected javax.xml.bind.Marshaller createMarshaller(java.lang.Object obj,
java.lang.Class<?> cls,
java.lang.reflect.Type genericType,
javax.ws.rs.core.MediaType m)
throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
getActualType
protected java.lang.Class<?> getActualType(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] anns)
checkAdapter
protected java.lang.Object checkAdapter(java.lang.Object obj,
java.lang.annotation.Annotation[] anns,
boolean marshal)
getAdapter
protected javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter getAdapter(java.lang.Class<?> type,
java.lang.annotation.Annotation[] anns)
getSchema
protected javax.xml.validation.Schema getSchema()
handleJAXBException
protected static void handleJAXBException(javax.xml.bind.JAXBException e)
Apache CXF