Class DefaultJaxBContextProvider

  • All Implemented Interfaces:
    JaxBContextProvider

    public class DefaultJaxBContextProvider
    extends java.lang.Object
    implements JaxBContextProvider
    Simple implementation for the JaxBContextProvider interface returning a new context each time it is invoked. This implementation does not perform any kind of caching.
    Author:
    Daniel Meyer
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.xml.bind.Marshaller createMarshaller​(java.lang.Class<?>... types)
      Obtain a Marshaller that can map the provided types.
      javax.xml.bind.Unmarshaller createUnmarshaller​(java.lang.Class<?>... types)
      Obtain an Unmarshaller that can map the provided types.
      javax.xml.bind.JAXBContext getContext​(java.lang.Class<?>... types)  
      • Methods inherited from class java.lang.Object

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

      • DefaultJaxBContextProvider

        public DefaultJaxBContextProvider()
    • Method Detail

      • getContext

        public javax.xml.bind.JAXBContext getContext​(java.lang.Class<?>... types)
      • createMarshaller

        public javax.xml.bind.Marshaller createMarshaller​(java.lang.Class<?>... types)
        Description copied from interface: JaxBContextProvider
        Obtain a Marshaller that can map the provided types.
        Specified by:
        createMarshaller in interface JaxBContextProvider
        Parameters:
        types - the Java Types that are going to be marshalled
        Returns:
        the Marshaller of marshalling the provided types to XML.
      • createUnmarshaller

        public javax.xml.bind.Unmarshaller createUnmarshaller​(java.lang.Class<?>... types)
        Description copied from interface: JaxBContextProvider
        Obtain an Unmarshaller that can map the provided types.
        Specified by:
        createUnmarshaller in interface JaxBContextProvider
        Parameters:
        types - the Java Types that are going to be unmarshalled
        Returns:
        the Marshaller of unmarshalling the provided types from XML.