Search in sources :

Example 1 with JAXBSerialiser

use of com.peterphi.std.util.jaxb.JAXBSerialiser in project stdlib by petergeneric.

the class JaxbObjectVar method getValue.

@Override
public Object getValue(final Injector injector) {
    JAXBSerialiserFactory jsf = injector.getInstance(JAXBSerialiserFactory.class);
    Class clazz = getClazz();
    JAXBSerialiser jaxbSerialiser = jsf.getInstance(clazz);
    return jaxbSerialiser.deserialise(xml);
}
Also used : JAXBSerialiser(com.peterphi.std.util.jaxb.JAXBSerialiser) JAXBSerialiserFactory(com.peterphi.std.util.jaxb.JAXBSerialiserFactory)

Aggregations

JAXBSerialiser (com.peterphi.std.util.jaxb.JAXBSerialiser)1 JAXBSerialiserFactory (com.peterphi.std.util.jaxb.JAXBSerialiserFactory)1