Class Resources
- java.lang.Object
-
- com.alibaba.druid.support.logging.Resources
-
public final class Resources extends Object
A class to simplify access to resources through the classloader.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Class<?>classForName(String className)Loads a classstatic ClassLoadergetDefaultClassLoader()Returns the default classloader (may be null).static voidsetDefaultClassLoader(ClassLoader defaultClassLoader)Sets the default classloader
-
-
-
Method Detail
-
getDefaultClassLoader
public static ClassLoader getDefaultClassLoader()
Returns the default classloader (may be null).- Returns:
- The default classloader
-
setDefaultClassLoader
public static void setDefaultClassLoader(ClassLoader defaultClassLoader)
Sets the default classloader- Parameters:
defaultClassLoader- - the new default ClassLoader
-
classForName
public static Class<?> classForName(String className) throws ClassNotFoundException
Loads a class- Parameters:
className- - the class to load- Returns:
- The loaded class
- Throws:
ClassNotFoundException- If the class cannot be found (duh!)
-
-