Class XmlStreamToObjectConverter
java.lang.Object
io.micronaut.xml.jackson.server.convert.XmlStreamToObjectConverter
- All Implemented Interfaces:
io.micronaut.core.convert.TypeConverter<ByteArrayXmlStreamReader,
Object>
@Singleton
@Internal
public class XmlStreamToObjectConverter
extends Object
implements io.micronaut.core.convert.TypeConverter<ByteArrayXmlStreamReader,Object>
Converts
ByteArrayXmlStreamReader
to object.- Since:
- 1.0.0
- Author:
- Sergey Vishnyakov
-
Constructor Summary
ConstructorDescriptionXmlStreamToObjectConverter
(com.fasterxml.jackson.dataformat.xml.XmlMapper xmlMapper, io.micronaut.core.convert.ConversionService conversionService) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.core.convert.TypeConverter
convert
-
Constructor Details
-
XmlStreamToObjectConverter
public XmlStreamToObjectConverter(com.fasterxml.jackson.dataformat.xml.XmlMapper xmlMapper, io.micronaut.core.convert.ConversionService conversionService) - Parameters:
xmlMapper
- The XML MapperconversionService
- The conversion service
-
-
Method Details
-
convert
public Optional<Object> convert(ByteArrayXmlStreamReader stream, Class<Object> targetType, io.micronaut.core.convert.ConversionContext context) - Specified by:
convert
in interfaceio.micronaut.core.convert.TypeConverter<ByteArrayXmlStreamReader,
Object>
-