RecordFieldDeclaration class abstract
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
- Inheritance
-
- Object
- Declaration
- EntityDeclaration
- SourceDeclaration
- RecordFieldDeclaration
Constructors
- RecordFieldDeclaration()
-
A representation of an individual field within a Dart record type in the
JetLeaf reflection system.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getAnnotations(
) → List< AnnotationDeclaration> -
Returns all annotations applied to this declaration.
inherited
-
getDartType(
) → DartType? -
The analyzer DartType of the entity for enhanced type operations.
inherited
-
getDebugIdentifier(
) → String -
The debug identifier for the entity.
inherited
-
getElement(
) → Element? -
The analyzer element associated with this declaration.
inherited
-
getIsNamed(
) → bool - Returns true if the field is named.
-
getIsPositional(
) → bool - Returns true if the field is positional.
-
getIsPublic(
) → bool -
Checks if this declaration is a public declaration.
inherited
-
getIsSynthetic(
) → bool -
Checks if a declaration is a synthetic declaration.
inherited
-
getLinkDeclaration(
) → LinkDeclaration - Returns the LinkDeclaration of the record field.
-
getName(
) → String -
Gets the name of the declared element.
inherited
-
getParentLibrary(
) → LibraryDeclaration -
Returns the LibraryDeclaration in which this declaration is defined.
inherited
-
getPosition(
) → int? -
Returns the positional index of the field (starting at 0), or
null
if named. -
getSourceLocation(
) → Uri? -
Returns the source code location (e.g., file path or URI) where this declaration is defined,
or
null
if not available in the current reflection context.inherited -
getType(
) → Type -
Gets the runtime type of the declared element.
inherited
-
hasAnalyzerSupport(
) → bool -
Returns true if this declaration has analyzer information available.
inherited
-
isNullable(
) → bool - Returns true if the field is nullable.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object> -
Returns a JSON representation of this entity.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited