Class JarFilePath


  • public final class JarFilePath
    extends java.lang.Object
    Class holding an IJarFile and a path inside the Jar file for the JarClassLoader.
    Author:
    Christopher Mindus
    • Constructor Summary

      Constructors 
      ConstructorDescription
      JarFilePath​(IJarFile jarFile, java.lang.String subDirectory)
      Constructor for a JarFile with a subdirectory path.
      JarFilePath​(java.io.File directory)
      Constructor for a directory on the file system.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o)
      Checks if two objects are equal.
      inthashCode()
      Gets the hash code.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JarFilePath

        public JarFilePath​(IJarFile jarFile,
                           java.lang.String subDirectory)
        Constructor for a JarFile with a subdirectory path.
        Parameters:
        jarFile - The Jar file.
        subDirectory - The subdirectory or null for Jar file root.
        Throws:
        java.lang.IllegalArgumentException - If the subDirectory is not found in the Jar file.
      • JarFilePath

        public JarFilePath​(java.io.File directory)
                    throws java.io.IOException
        Constructor for a directory on the file system.
        Parameters:
        directory - The instance must be an existing directory.
        Throws:
        java.io.IOException - If the instance does not exist or is not a directory.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Checks if two objects are equal.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if equal, false otherwise.
      • hashCode

        public int hashCode()
        Gets the hash code.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A hash code.