java.lang.Object
net.automatalib.common.util.lib.LibLoader
Utility (singleton) class to manage loading of native libraries.
-
Method Summary
Modifier and TypeMethodDescriptionstatic LibLoadervoidloadLibrary(Class<?> clazz, String name) Loads a native library.voidloadLibrary(Class<?> clazz, String name, LoadPolicy policy) Loads a native library with the givenload policy.
-
Method Details
-
getInstance
-
loadLibrary
Loads a native library. UsesLoadPolicy.PREFER_SHIPPEDas the default loading policy.- Parameters:
clazz- The class whose classloader should be used to resolve shipped librariesname- The name of the class.- Throws:
LoadLibraryException- if the library could not be loaded correctly
-
loadLibrary
Loads a native library with the givenload policy.- Parameters:
clazz- The class whose classloader should be used to resolve shipped librariesname- The name of the class.policy- The load policy.- Throws:
LoadLibraryException- if the library could not be loaded correctly
-