Class ClassLoaderUtils
- java.lang.Object
-
- network.oxalis.ng.commons.filesystem.ClassLoaderUtils
-
public class ClassLoaderUtils extends Object
Util class used to support use of class loader in Oxalis.- Since:
- 4.0.0
- Author:
- erlend
-
-
Constructor Summary
Constructors Constructor Description ClassLoaderUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static URL[]findJarFiles(Path directory)static ClassLoaderinitiate(Path path)Inititiates aClassLoaderfromPath.
-
-
-
Method Detail
-
initiate
public static ClassLoader initiate(Path path)
Inititiates aClassLoaderfromPath. Behaviour changes based upon input:- Path is `null` - Returns current class loader.
- Path is a file - Returns class loader using that file only.
- Path is a directory - Returns class loader using all jar-files in directory.
- Otherwise is exception thrown.
- Parameters:
path- Path to be used when initiating class loader.- Returns:
- Class loader ready for use.
-
-