RecordField.linked constructor

RecordField.linked(
  1. RecordFieldDeclaration declaration,
  2. RecordDeclaration record,
  3. ProtectionDomain pd
)

Links a RecordFieldDeclaration and parent RecordDeclaration to create a new RecordField instance within the given ProtectionDomain.

This is the primary factory for creating RecordField objects.

Parameters:

  • declaration: The declaration describing this field
  • record: The parent record containing this field
  • pd: The protection domain in which this field is defined

Returns a RecordField instance.

A representation of an individual field within a Dart record type in the JetLeaf reflection system.

This abstraction allows inspecting both named and positional fields of a record. Provides metadata such as name, position, type, and whether it's named.

Example

final field = MyReflectedRecordField(...);
print(field.getIsNamed()); // true

Implementation

factory RecordField.linked(RecordFieldDeclaration declaration, RecordDeclaration record, ProtectionDomain pd) = _RecordField;