@CallerSensitive @ForceInline
public ClassLoader getClassLoader ()

Returns the class loader for the class. Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class was loaded by the bootstrap class loader.

If this object represents a primitive type or void, null is returned.

Returns:  the class loader that loaded the class or interface represented by this object.

Exceptions:
SecurityException     if a security manager is present, and the caller's class loader is not null and is not the same as or an ancestor of the class loader for the class whose class loader is requested, and the caller does not have the RuntimePermission ("getClassLoader")

See also:
java.lang.ClassLoader, SecurityManager.checkPermission, java.lang.RuntimePermission