Top Fields Constructors Methods
com.sun.org.apache.xml.internal.security.transforms

pack-priv final Class ClassLoaderUtils

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static Class<?>
loadClass(String
The name of the class to load
className
,
Class<?>
The Class object of the calling object
callingClass
)

Load a class with a given name.

private static Class<?>
loadClass2(String className, Class<?> callingClass)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final Logger LOG

Constructor Detail

ClassLoaderUtilsback to summary
private ClassLoaderUtils()

Method Detail

loadClassback to summary
pack-priv static Class<?> loadClass(String className, Class<?> callingClass) throws ClassNotFoundException

Load a class with a given name.

It will try to load the class in the following order:
  • From Thread.currentThread().getContextClassLoader()
  • Using the basic Class.forName()
  • From ClassLoaderUtil.class.getClassLoader()
  • From the callingClass.getClassLoader()
Parameters
className:String

The name of the class to load

callingClass:Class<?>

The Class object of the calling object

Exceptions
ClassNotFoundException:
If the class cannot be found anywhere.
loadClass2back to summary
private static Class<?> loadClass2(String className, Class<?> callingClass) throws ClassNotFoundException