Class JarFilePath
java.lang.Object
com.iizix.util.JarFilePath
Class holding an IJarFile and a path inside the Jar file for the JarClassLoader.
- Author:
- Christopher Mindus
Constructor Summary
ConstructorsConstructorDescriptionJarFilePath(IJarFile jarFile, String subDirectory) Constructor for a JarFile with a subdirectory path.JarFilePath(File directory) Constructor for a directory on the file system.Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if two objects are equal: two class path entries are equal when they name the same directory on the file system, or the same Jar file and the same subdirectory inside it (the root, however spelled, is one subdirectory: normalized at construction).inthashCode()Gets the hash code.
Constructor Details
JarFilePath
Constructor for a JarFile with a subdirectory path.- Parameters:
jarFile- The Jar file.subDirectory- The subdirectory or null for Jar file root.- Throws:
IllegalArgumentException- If thesubDirectoryis not found in the Jar file.
JarFilePath
Constructor for a directory on the file system.- Parameters:
directory- The instance must be an existing directory.- Throws:
IOException- If the instance does not exist or is not a directory.
Method Details
equals
Checks if two objects are equal: two class path entries are equal when they name the same directory on the file system, or the same Jar file and the same subdirectory inside it (the root, however spelled, is one subdirectory: normalized at construction). Before CC-FIX-JARFILEPATH-EQUALS, any two directory entries and any two entries on one Jar file compared equal whatever their directories, while the hash code told them apart.hashCode