public class ApplicationXml2Factory extends ApplicationJsonFactory implements MediaTypeFactory
MediaTypeFactory
for Media-Type "application/xml" (
MediaType.APPLICATION_XML
).
CAUTION: This implementation uses getter/setter property resolution instead
of field resolution as of the used marshaling API.MediaTypeAccessor.MediaTypeBuilder<B extends MediaTypeAccessor.MediaTypeBuilder<B>>, MediaTypeAccessor.MediaTypeMutator, MediaTypeAccessor.MediaTypeProperty
IS_MARSHAL_WITH_VARIABLE_DECLARATION
Constructor and Description |
---|
ApplicationXml2Factory() |
Modifier and Type | Method and Description |
---|---|
MediaType |
getMediaType()
Gets the media type.
|
String |
toMarshaled(Object aObject)
To marshaled.
|
<T> T |
toUnmarshaled(String aHttpBody,
Class<T> aType)
To unmarshaled.
|
toElementName, toPlainJson, toUnboxed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fromMarshaled, fromMarshaled, fromMarshaled, fromMarshaled, fromUnmarshaled, fromUnmarshaled
public MediaType getMediaType()
getMediaType
in interface MediaTypeAccessor
getMediaType
in class ApplicationJsonFactory
public String toMarshaled(Object aObject) throws org.refcodes.exception.MarshalException
toMarshaled
in interface org.refcodes.factory.MarshalFactory<String>
toMarshaled
in class ApplicationJsonFactory
aObject
- the a objectorg.refcodes.exception.MarshalException
- the marshal exceptionpublic <T> T toUnmarshaled(String aHttpBody, Class<T> aType) throws org.refcodes.exception.UnmarshalException
toUnmarshaled
in interface org.refcodes.factory.UnmarshalFactory<String>
toUnmarshaled
in class ApplicationJsonFactory
T
- the generic typeaHttpBody
- the a http bodyaType
- the a typeorg.refcodes.exception.UnmarshalException
- the unmarshal exceptionCopyright © 2017. All rights reserved.