Class MiniJAXB


  • @Internal
    public final class MiniJAXB
    extends java.lang.Object
    This class allows for mashalling / unmarshalling XML content to jOOQ configuration objects.

    With jOOQ 3.12, the JAXB dependency has been removed in favour of this home grown solution. Due to the modularisation that happened with JDK 9+ and the removal of JAXB from the JDK 11+, it is unreasonable to leave the burden of properly configuring transitive JAXB dependency to jOOQ users.

    Author:
    Lukas Eder
    • Constructor Summary

      Constructors 
      Constructor Description
      MiniJAXB()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T append​(T first, T second)
      Appends a second JAXB annotated object to a first one using Maven's combine.children="append" semantics.
      static java.lang.String marshal​(XMLAppendable object)  
      static void marshal​(XMLAppendable object, java.io.OutputStream out)  
      static void marshal​(XMLAppendable object, java.io.Writer out)  
      static <T extends XMLAppendable>
      T
      unmarshal​(java.io.File xml, java.lang.Class<T> type)  
      static <T extends XMLAppendable>
      T
      unmarshal​(java.io.InputStream in, java.lang.Class<T> type)  
      static <T extends XMLAppendable>
      T
      unmarshal​(java.lang.String xml, java.lang.Class<T> type)  
      • Methods inherited from class java.lang.Object

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

      • MiniJAXB

        public MiniJAXB()
    • Method Detail

      • marshal

        public static java.lang.String marshal​(XMLAppendable object)
      • marshal

        public static void marshal​(XMLAppendable object,
                                   java.io.OutputStream out)
      • marshal

        public static void marshal​(XMLAppendable object,
                                   java.io.Writer out)
      • unmarshal

        public static <T extends XMLAppendable> T unmarshal​(java.io.InputStream in,
                                                            java.lang.Class<T> type)
      • unmarshal

        public static <T extends XMLAppendable> T unmarshal​(java.lang.String xml,
                                                            java.lang.Class<T> type)
      • unmarshal

        public static <T extends XMLAppendable> T unmarshal​(java.io.File xml,
                                                            java.lang.Class<T> type)
      • append

        public static <T> T append​(T first,
                                   T second)
        Appends a second JAXB annotated object to a first one using Maven's combine.children="append" semantics.
        Returns:
        The modified first argument.