Class ClassLoaderUtils


  • public class ClassLoaderUtils
    extends Object
    Util class used to support use of class loader in Oxalis.
    Since:
    4.0.0
    Author:
    erlend
    • Constructor Detail

      • ClassLoaderUtils

        public ClassLoaderUtils()
    • Method Detail

      • initiate

        public static ClassLoader initiate​(Path path)
        Inititiates a ClassLoader from Path. 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.
      • findJarFiles

        protected static URL[] findJarFiles​(Path directory)