Package org.hibernate.boot.jaxb.internal
Class XmlSources
- java.lang.Object
-
- org.hibernate.boot.jaxb.internal.XmlSources
-
-
Constructor Summary
Constructors Constructor Description XmlSources()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static XmlSourcefromCacheableFile(File file)static XmlSourcefromCacheableFile(File file, boolean strict)static XmlSourcefromCacheableFile(File file, File cacheableDir)static XmlSourcefromCacheableFile(File file, File cacheableDir, boolean strict)static XmlSourcefromDocument(Document document)static XmlSourcefromFile(File file)static voidfromJar(File jar, Consumer<XmlSource> consumer)Read all.hbm.xmlmappings from a jar file and pass them to the givenConsumer.static XmlSourcefromResource(String resourceName, ClassLoaderService classLoaderService)Create anXmlSourcefrom a named resourcestatic XmlSourcefromStream(InputStream inputStream)static XmlSourcefromStream(InputStreamAccess inputStreamAccess)static XmlSourcefromUrl(URL url)Create anXmlSourcefrom a URL
-
-
-
Method Detail
-
fromResource
public static XmlSource fromResource(String resourceName, ClassLoaderService classLoaderService)
Create anXmlSourcefrom a named resource
-
fromCacheableFile
public static XmlSource fromCacheableFile(File file, File cacheableDir, boolean strict)
-
fromStream
public static XmlSource fromStream(InputStreamAccess inputStreamAccess)
-
fromStream
public static XmlSource fromStream(InputStream inputStream)
-
fromJar
public static void fromJar(File jar, Consumer<XmlSource> consumer)
Read all.hbm.xmlmappings from a jar file and pass them to the givenConsumer.Assumes that any file named
*.hbm.xmlis a mapping document. This method does not supportorm.xmlfiles!- Parameters:
jar- a jar fileconsumer- a consumer of the resulting XML sources
-
-