public static Cell copyCell(Cell cell, Unmarshaller unmarshaller, Marshaller marshaller) { try { JAXBElement<Cell> contentObject = new JAXBElement<>(new QName(cellName), Cell.class, cell); JAXBSource source = new JAXBSource(marshaller, contentObject); source.setXMLReader(new PseudoXMLReader(marshaller, contentObject)); JAXBElement<Cell> elem = unmarshaller.unmarshal(source, Cell.class); return elem.getValue(); } catch (JAXBException e) { throw new IllegalStateException(e); } }
public static Cell copyCell(Cell cell, Unmarshaller unmarshaller, Marshaller marshaller) { try { JAXBElement<Cell> contentObject = new JAXBElement<>(new QName(cellName), Cell.class, cell); JAXBSource source = new JAXBSource(marshaller, contentObject); source.setXMLReader(new PseudoXMLReader(marshaller, contentObject)); JAXBElement<Cell> elem = unmarshaller.unmarshal(source, Cell.class); return elem.getValue(); } catch (JAXBException e) { throw new IllegalStateException(e); } }
public JAXBSource(JAXBContext context, Object contentObject) throws JAXBException { if (context == null) { throw new JAXBException("context must not be null"); } if (contentObject == null) { throw new JAXBException("contentObject must not be null"); } setXMLReader(new Reader(context.createMarshaller(), contentObject)); setInputSource(new InputSource()); }
public JAXBSource(JAXBContext context, Object contentObject) throws JAXBException { if (context == null) { throw new JAXBException("context must not be null"); } if (contentObject == null) { throw new JAXBException("contentObject must not be null"); } setXMLReader(new Reader(context.createMarshaller(), contentObject)); setInputSource(new InputSource()); }
public JAXBSource(JAXBContext context, Object contentObject) throws JAXBException { if (context == null) { throw new JAXBException("context must not be null"); } if (contentObject == null) { throw new JAXBException("contentObject must not be null"); } setXMLReader(new Reader(context.createMarshaller(), contentObject)); setInputSource(new InputSource()); }
public JAXBSource(JAXBContext context, Object contentObject) throws JAXBException { if (context == null) { throw new JAXBException("context must not be null"); } if (contentObject == null) { throw new JAXBException("contentObject must not be null"); } setXMLReader(new Reader(context.createMarshaller(), contentObject)); setInputSource(new InputSource()); }
public JAXBSource(final Marshaller marshaller, final Object contentObject) throws JAXBException { if (marshaller == null) { throw new JAXBException("marshaller must not be null"); } if (contentObject == null) { throw new JAXBException("contentObject must not be null"); } setXMLReader(new Reader(marshaller, contentObject)); setInputSource(new InputSource()); }
public JAXBSource(final Marshaller marshaller, final Object contentObject) throws JAXBException { if (marshaller == null) { throw new JAXBException("marshaller must not be null"); } if (contentObject == null) { throw new JAXBException("contentObject must not be null"); } setXMLReader(new Reader(marshaller, contentObject)); setInputSource(new InputSource()); }
public JAXBSource(final Marshaller marshaller, final Object contentObject) throws JAXBException { if (marshaller == null) { throw new JAXBException("marshaller must not be null"); } if (contentObject == null) { throw new JAXBException("contentObject must not be null"); } setXMLReader(new Reader(marshaller, contentObject)); setInputSource(new InputSource()); }
public JAXBSource(final Marshaller marshaller, final Object contentObject) throws JAXBException { if (marshaller == null) { throw new JAXBException("marshaller must not be null"); } if (contentObject == null) { throw new JAXBException("contentObject must not be null"); } setXMLReader(new Reader(marshaller, contentObject)); setInputSource(new InputSource()); }