public final class ClassLoaderUtils extends Object
ClassLoader
resolution and the likeModifier and Type | Method and Description |
---|---|
static Class<?> |
classForName(String name,
ClassLoader... classLoaders)
Attempts to instantiate the named class, using each of the specified
ClassLoaders in turn or Class.forName if these do not work
|
static ClassLoader[] |
getClassLoaders(ClassLoader... classLoaders)
Gets
ClassLoader for the current thread |
public static ClassLoader[] getClassLoaders(ClassLoader... classLoaders)
ClassLoader
for the current threadclassLoaders
- ClassLoaders to be used if specifiedpublic static Class<?> classForName(String name, ClassLoader... classLoaders) throws ClassNotFoundException
name
- The class nameclassLoaders
- ClassLoaders to be usedClassNotFoundException
- If the class cannot be foundCopyright © 2010–2018 Jadira Systems. All rights reserved.