use of org.openecard.ws.marshal.WSMarshaller in project open-ecard by ecsec.
the class JAXBUtils method deepCopy.
@Nonnull
public static <T> T deepCopy(@Nonnull T in) throws MarshallingTypeException, WSMarshallerException {
WSMarshaller m = WSMarshallerFactory.createInstance();
Document d = m.marshal(in);
Object out = m.unmarshal(d);
return ((Class<T>) in.getClass()).cast(out);
}
Aggregations