Condividi tramite


ClassLoader.SystemClassLoader Property

Definition

Returns the system class loader for delegation.

public static Java.Lang.ClassLoader? SystemClassLoader { [Android.Runtime.Register("getSystemClassLoader", "()Ljava/lang/ClassLoader;", "")] get; }
[<get: Android.Runtime.Register("getSystemClassLoader", "()Ljava/lang/ClassLoader;", "")>]
static member SystemClassLoader : Java.Lang.ClassLoader

Property Value

The system ClassLoader for delegation, or null if none

Attributes

Remarks

Returns the system class loader for delegation. This is the default delegation parent for new ClassLoader instances, and is typically the class loader used to start the application.

This method is first invoked early in the runtime's startup sequence, at which point it creates the system class loader and sets it as the context class loader of the invoking Thread.

The default system class loader is an implementation-dependent instance of this class.

If a security manager is present, and the invoker's class loader is not null and the invoker's class loader is not the same as or an ancestor of the system class loader, then this method invokes the security manager's SecurityManager#checkPermission(java.security.Permission) <tt>checkPermission</tt> method with a RuntimePermission#RuntimePermission(String) <tt>RuntimePermission("getClassLoader")</tt> permission to verify access to the system class loader. If not, a SecurityException will be thrown.

Java documentation for java.lang.ClassLoader.getSystemClassLoader().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to