다음을 통해 공유


Class.NestHost Property

Definition

Returns the nest host of the nest to which the class or interface represented by this Class object belongs.

public Java.Lang.Class NestHost { [Android.Runtime.Register("getNestHost", "()Ljava/lang/Class;", "", ApiSince=34)] get; }
[<get: Android.Runtime.Register("getNestHost", "()Ljava/lang/Class;", "", ApiSince=34)>]
member this.NestHost : Java.Lang.Class

Property Value

the nest host of this class or interface

Attributes

Remarks

Returns the nest host of the nest to which the class or interface represented by this Class object belongs. Every class and interface belongs to exactly one nest.

If the nest host of this class or interface has previously been determined, then this method returns the nest host. If the nest host of this class or interface has not previously been determined, then this method determines the nest host using the algorithm of JVMS 5.4.4, and returns it.

Often, a class or interface belongs to a nest consisting only of itself, in which case this method returns this to indicate that the class or interface is the nest host.

If this Class object represents a primitive type, an array type, or void, then this method returns this, indicating that the represented entity belongs to the nest consisting only of itself, and is the nest host.

Added in 11.

Java documentation for java.lang.Class.getNestHost().

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