Package org.apache.tomcat.jdbc.pool
Class ClassLoaderUtil
- java.lang.Object
-
- org.apache.tomcat.jdbc.pool.ClassLoaderUtil
-
public class ClassLoaderUtil extends java.lang.ObjectUtility class for loading classes using multiple class loaders.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Class<?>loadClass(java.lang.String className, java.lang.ClassLoader... classLoaders)Attempts to load the specified class using the given class loaders in order.
-
-
-
Method Detail
-
loadClass
public static java.lang.Class<?> loadClass(java.lang.String className, java.lang.ClassLoader... classLoaders) throws java.lang.ClassNotFoundExceptionAttempts to load the specified class using the given class loaders in order.A loader that cannot see the class, or that sees a copy which fails to link or initialize, does not end the search: the next loader is tried and the fallback is logged. Fatal errors propagated by
ExceptionUtils.handleThrowableabort the chain.- Parameters:
className- the fully qualified class nameclassLoaders- the class loaders to attempt, in order- Returns:
- the loaded class
- Throws:
java.lang.ClassNotFoundException- if no class loader was supplied, or none of them could load the class; the failure of the last loader attempted is the cause
-
-