Share via


Class.GetRecordComponents Method

Definition

Returns an array of RecordComponent objects representing all the record components of this record class, or null if this class is not a record class.

[Android.Runtime.Register("getRecordComponents", "()[Ljava/lang/reflect/RecordComponent;", "", ApiSince=34)]
public Java.Lang.Reflect.RecordComponent[]? GetRecordComponents ();
[<Android.Runtime.Register("getRecordComponents", "()[Ljava/lang/reflect/RecordComponent;", "", ApiSince=34)>]
member this.GetRecordComponents : unit -> Java.Lang.Reflect.RecordComponent[]

Returns

An array of RecordComponent objects representing all the record components of this record class, or null if this class is not a record class

Attributes

Remarks

Returns an array of RecordComponent objects representing all the record components of this record class, or null if this class is not a record class.

The components are returned in the same order that they are declared in the record header. The array is empty if this record class has no components. If the class is not a record class, that is #isRecord() returns false, then this method returns null. Conversely, if #isRecord() returns true, then this method returns a non-null value.

Added in 16.

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

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