Interface ArchiveDescriptor


public interface ArchiveDescriptor

Models a logical archive, which might be

  • a jar file
  • a zip file
  • an exploded directory
  • etc

Used mainly for scanning purposes via visitClassEntries(Consumer) and locating "well known" resources via findEntry(String)

  • Method Details

    • getUrl

      URL getUrl()
      The URL which is the base of this archive.
    • visitClassEntries

      void visitClassEntries(Consumer<ArchiveEntry> entryConsumer)
      Visit each entry in the archive which represents a class.
    • findEntry

      @Nullable ArchiveEntry findEntry(String relativePath)
      Resolve the given path relative to this archive.
      Implementation Note:
      Typically used to find META-INF/persistence.xml and META-INF/orm.xml files.
    • resolveJarFileReference

      @Nonnull ArchiveDescriptor resolveJarFileReference(@Nonnull String jarFileReference)
      Resolve a named archive relative to this archive. Generally the given name comes from the META-INF/persistence.xml within this archive using <jar-file/>.
      Parameters:
      jarFileReference - The name given in persistence.xml via <jar-file/>