Class JarFile

  • All Implemented Interfaces:
    Comparable<JarFile>

    public class JarFile
    extends Object
    implements Comparable<JarFile>
    Simple Jar file representation holding name and version information.
    Since:
    1.10.0
    Author:
    Pascal Essiembre
    • Field Detail

    • Constructor Detail

      • JarFile

        public JarFile​(File jarFile)
    • Method Detail

      • getPath

        public File getPath()
      • getFullName

        public String getFullName()
      • getBaseName

        public String getBaseName()
      • getVersion

        public String getVersion()
      • getLastModified

        public Date getLastModified()
      • isVersionGreaterThan

        public boolean isVersionGreaterThan​(JarFile file)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • isSameVersion

        public boolean isSameVersion​(JarFile jarFile)
        Gets whether this Jar has the same name and version as the provided jar.
        Parameters:
        jarFile - jar file
        Returns:
        true if the jar names and versions are the same.
        Since:
        1.13.0
      • isSameVersionAndTime

        public boolean isSameVersionAndTime​(JarFile jarFile)
        Gets whether this Jar has the same name and version as the provided jar, as well as the same last modified date.
        Parameters:
        jarFile - jar file
        Returns:
        true if the jar names, versions and last modified dates are the same.
        Since:
        1.13.0