Class StreamArtifactResourceResolver

    • Constructor Detail

      • StreamArtifactResourceResolver

        public StreamArtifactResourceResolver​(int priority)
      • StreamArtifactResourceResolver

        public StreamArtifactResourceResolver​(java.lang.ClassLoader classLoader,
                                              int priority)
    • Method Detail

      • resolve

        public final Artifact resolve​(java.net.URL resourceURL)
        Description copied from interface: ArtifactResourceResolver
        Resolve an instance Artifact from the resource of artifact.
        Parameters:
        resourceURL - the resource of artifact, it may the archive file or the directory
        Returns:
        an instance Artifact if found, otherwise null
      • readArtifactMetadataDataFromResource

        @Nullable
        protected java.io.InputStream readArtifactMetadataDataFromResource​(java.net.URL resourceURL,
                                                                           java.lang.ClassLoader classLoader)
                                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • readArtifactMetadataDataFromArchiveFile

        @Nullable
        protected java.io.InputStream readArtifactMetadataDataFromArchiveFile​(java.io.File archiveFile)
                                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • readArtifactMetadataDataFromFile

        @Nullable
        protected java.io.InputStream readArtifactMetadataDataFromFile​(java.io.File archiveFile)
                                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • readArtifactMetadataDataFromDirectory

        @Nullable
        protected java.io.InputStream readArtifactMetadataDataFromDirectory​(java.io.File directory)
                                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • findArtifactMetadataEntry

        protected java.util.jar.JarEntry findArtifactMetadataEntry​(java.util.jar.JarFile jarFile)
                                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • findArtifactMetadata

        protected java.io.File findArtifactMetadata​(java.io.File directory)
                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • isArtifactMetadataEntry

        protected boolean isArtifactMetadataEntry​(java.util.jar.JarEntry jarEntry)
      • isArtifactMetadataFile

        protected boolean isArtifactMetadataFile​(java.io.File directory,
                                                 java.io.File file)
      • isArtifactMetadata

        protected abstract boolean isArtifactMetadata​(java.lang.String relativePath)
      • resolve

        protected abstract Artifact resolve​(java.net.URL resourceURL,
                                            java.io.InputStream artifactMetadataData,
                                            java.lang.ClassLoader classLoader)
                                     throws java.io.IOException
        Throws:
        java.io.IOException