Class JaxbBuilder

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected JaxbBuilder​(java.lang.Object object)
      Creates a builder based on the given object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object getMarshaller()
      Provides the custom Marshaller.
      protected java.lang.Object getObject()
      Provides the configured object.
      protected boolean getUseObjectFactory()
      Provides whether the given Object has no XmlRootElement annotation and is not an instants of JAXBElement it must be wrapped by a JAXBElement.
      JaxbBuilder useObjectFactory()
      Whether the given Object has no XmlRootElement annotation and is not an instants of JAXBElement it must be wrapped by a JAXBElement.
      JaxbBuilder withMarshaller​(java.lang.Object marshaller)
      Sets a non-default Marshaller to use when creating the Source.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JaxbBuilder

        protected JaxbBuilder​(java.lang.Object object)
        Creates a builder based on the given object.
        Parameters:
        object - the object to build a source of
    • Method Detail

      • withMarshaller

        public JaxbBuilder withMarshaller​(java.lang.Object marshaller)
        Sets a non-default Marshaller to use when creating the Source.
        Parameters:
        marshaller - the Marshaller to use
        Returns:
        this
      • useObjectFactory

        public JaxbBuilder useObjectFactory()
        Whether the given Object has no XmlRootElement annotation and is not an instants of JAXBElement it must be wrapped by a JAXBElement.

        This method will find the ObjectFactory class (normally generated by jaxb) and use the first matching factory-method for the given Object to create the JAXBElement-Wrapper.

        If no ObjectFactory and method exists for the given object, the default behavior (same behavior as by JAXB) will be used to create the JAXBElement-Wrapper for the given Object.

        If you don't use the xjc:simple flag to generate your JAXB-Objects, the use of the OjectFactory is most likely required to generate Schema-Valid XML.

        Returns:
        this
      • getObject

        protected final java.lang.Object getObject()
        Provides the configured object.
        Returns:
        the configured object
        Since:
        2.9.0
      • getMarshaller

        protected final java.lang.Object getMarshaller()
        Provides the custom Marshaller.
        Returns:
        the configured Marshaller
        Since:
        2.9.0
      • getUseObjectFactory

        protected final boolean getUseObjectFactory()
        Provides whether the given Object has no XmlRootElement annotation and is not an instants of JAXBElement it must be wrapped by a JAXBElement.
        Returns:
        whether the given Object has no XmlRootElement annotation and is not an instants of JAXBElement it must be wrapped by a JAXBElement.
        Since:
        2.9.0