java.lang.Object
net.automatalib.common.util.lib.LibLoader

public final class LibLoader extends Object
Utility (singleton) class to manage loading of native libraries.
  • Method Details

    • getInstance

      public static LibLoader getInstance()
    • loadLibrary

      public void loadLibrary(Class<?> clazz, String name)
      Loads a native library. Uses LoadPolicy.PREFER_SHIPPED as the default loading policy.
      Parameters:
      clazz - The class whose classloader should be used to resolve shipped libraries
      name - The name of the class.
      Throws:
      LoadLibraryException - if the library could not be loaded correctly
    • loadLibrary

      public void loadLibrary(Class<?> clazz, String name, LoadPolicy policy)
      Loads a native library with the given load policy.
      Parameters:
      clazz - The class whose classloader should be used to resolve shipped libraries
      name - The name of the class.
      policy - The load policy.
      Throws:
      LoadLibraryException - if the library could not be loaded correctly