NativeExtensionCallable class

A callable for a native (bridged) extension member.

Wraps a native function adapter and provides metadata about whether it's a getter, setter, or operator — matching the protocol of InterpretedExtensionMethod so that findExtensionMember call sites can handle both interpreted and native extension members uniformly.

The adapter function receives the target instance as the first positional argument (the this value), following the same convention as InterpretedExtensionMethod.

Implemented types

Constructors

NativeExtensionCallable({required String name, required Function adapter, bool isGetter = false, bool isSetter = false, bool isOperator = false, int arity = 1})

Properties

adapter Function
final
arity int
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
isGetter bool
final
isOperator bool
final
isSetter bool
final
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(InterpreterVisitor visitor, List<Object?> positionalArguments, [Map<String, Object?> namedArguments = const {}, List<RuntimeType>? typeArguments = const []]) Object?
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited