- java.lang.Object
-
- org.arakhne.afc.vmutil.ClassLoaderFinder
-
public final class ClassLoaderFinder extends Object
This utility class permits to find the better class loader for your application.It tries to find the preferred class loader registered with
setPreferredClassLoader(ClassLoader)
. If none was found, the default class loader will be replied.- Version:
- 17.0 2020-01-04 14:41:35
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- vmutils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ClassLoader
findClassLoader()
Replies the better class loader.static void
popPreferredClassLoader()
Pop the preferred class loader.static void
setPreferredClassLoader(ClassLoader classLoader)
Set the preferred class loader.
-
-
-
Method Detail
-
findClassLoader
@Pure public static ClassLoader findClassLoader()
Replies the better class loader.It tries to find the preferred class loader. If none was found, the default class loader will be replied.
- Returns:
- the class loader, never
null
-
setPreferredClassLoader
public static void setPreferredClassLoader(ClassLoader classLoader)
Set the preferred class loader.- Parameters:
classLoader
- is the preferred class loader
-
popPreferredClassLoader
public static void popPreferredClassLoader()
Pop the preferred class loader.
-
-