Class PathTreeWithManifest

    • Field Detail

      • JAVA_VERSION

        public static final int JAVA_VERSION
      • manifestEnabled

        protected boolean manifestEnabled
      • manifestInitialized

        protected transient boolean manifestInitialized
      • multiReleaseMapping

        protected volatile Map<String,​String> multiReleaseMapping
    • Constructor Detail

      • PathTreeWithManifest

        protected PathTreeWithManifest()
      • PathTreeWithManifest

        protected PathTreeWithManifest​(boolean manifestEnabled)
      • PathTreeWithManifest

        protected PathTreeWithManifest​(PathTreeWithManifest pathTreeWithManifest)
    • Method Detail

      • apply

        public <T> T apply​(String relativePath,
                           Function<PathVisit,​T> func)
        Description copied from interface: PathTree
        Applies a function to a given path relative to the root of the tree. If the path isn't found in the tree, the PathVisit argument passed to the function will be null.
        Specified by:
        apply in interface PathTree
        Type Parameters:
        T - resulting type
        Parameters:
        relativePath - relative path to process
        func - processing function
        Returns:
        result of the function
      • apply

        protected abstract <T> T apply​(String relativePath,
                                       Function<PathVisit,​T> func,
                                       boolean manifestEnabled)
      • getManifest

        public Manifest getManifest()
        Description copied from interface: PathTree
        If META-INF/MANIFEST.MF found, reads it and returns an instance of Manifest, otherwise returns null.
        Specified by:
        getManifest in interface PathTree
        Returns:
        parsed META-INF/MANIFEST.MF if it's found, otherwise null
      • initManifest

        protected void initManifest​(Manifest m)
      • isMultiReleaseJar

        public boolean isMultiReleaseJar()
      • getMultiReleaseMapping

        protected Map<String,​String> getMultiReleaseMapping()
      • initMultiReleaseMapping

        protected void initMultiReleaseMapping​(Map<String,​String> mrMapping)
      • toMultiReleaseRelativePath

        protected String toMultiReleaseRelativePath​(String relativePath)