Package de.focus_shift.util
Class ClassLoadingUtil
- java.lang.Object
-
- de.focus_shift.util.ClassLoadingUtil
-
public class ClassLoadingUtil extends Object
ClassLoadingUtil class.
- Version:
- $Id: $
- Author:
- José Pedro Pereira - Linkare TI
-
-
Constructor Summary
Constructors Constructor Description ClassLoadingUtil()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassLoadergetClassloader()Returns the current threads context classloader.Class<?>loadClass(String className)Loads the class by class name with the current threads context classloader.
-
-
-
Method Detail
-
loadClass
public Class<?> loadClass(String className) throws ClassNotFoundException
Loads the class by class name with the current threads context classloader. If there occurs an exception the class will be loaded by default classloader.- Parameters:
className- aStringobject.- Returns:
- a
Classobject. - Throws:
ClassNotFoundException- if any.
-
getClassloader
public ClassLoader getClassloader()
Returns the current threads context classloader.- Returns:
- the current threads context classloader
- See Also:
Thread.currentThread()
-
-