All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bytekast.sweettalk.util.JAXBUtil.groovy Maven / Gradle / Ivy

The newest version!
package com.bytekast.sweettalk.util

import groovy.transform.CompileStatic
import groovy.transform.Memoized
import groovy.transform.WithReadLock

import javax.xml.bind.JAXBContext

@Singleton
@CompileStatic
class JAXBUtil {

  @Memoized
  @WithReadLock
  JAXBContext createContext(Class model) {
    model ? JAXBContext.newInstance(model) : null
  }

  @Memoized
  @WithReadLock
  JAXBContext createContext(String contextPath) {
    contextPath ? JAXBContext.newInstance(contextPath) : null
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy