Sdílet prostřednictvím


ClassLoader.Parent Property

Definition

Returns the parent class loader for delegation.

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

Property Value

The parent ClassLoader

Attributes

Remarks

Returns the parent class loader for delegation. Some implementations may use null to represent the bootstrap class loader. This method will return null in such implementations if this class loader's parent is the bootstrap class loader.

If a security manager is present, and the invoker's class loader is not null and is not an ancestor of this 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 parent class loader is permitted. If not, a SecurityException will be thrown.

Added in 1.2.

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

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