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()); }
@Override public Source build() { try { if (marshaller == null) { createDefaultMarshaller(); } final Object jaxbObject = getPreparedJaxbObject(); final JAXBSource jaxbSource = new JAXBSource(marshaller, jaxbObject); // the fake InputSource cannot be used (the Convert.java // will create a working one if it is null) jaxbSource.setInputSource(null); return jaxbSource; } catch (final JAXBException e) { throw new DataBindingException(e); } }