다음을 통해 공유


Class.IsRecord Property

Definition

Returns true if and only if this class is a record class.

public bool IsRecord { [Android.Runtime.Register("isRecord", "()Z", "", ApiSince=34)] get; }
[<get: Android.Runtime.Register("isRecord", "()Z", "", ApiSince=34)>]
member this.IsRecord : bool

Property Value

true if and only if this class is a record class, otherwise false

Attributes

Remarks

Returns true if and only if this class is a record class.

The #getSuperclass() direct superclass of a record class is java.lang.Record. A record class is Modifier#FINAL final. A record class has (possibly zero) record components; #getRecordComponents() returns a non-null but possibly empty value for a record.

Note that class Record is not a record class and thus invoking this method on class Record returns false.

Added in 16.

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

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