InterfaceProxyFactory typedef

InterfaceProxyFactory = Object? Function(InterpreterVisitor visitor, InterpretedInstance instance)

RC-1: Factory for creating native proxy objects that delegate method calls back to an InterpretedInstance.

When a D4rt script class implements or extends a bridged abstract class or interface (e.g., class MyClipper extends CustomClipper<Path>), the resulting InterpretedInstance cannot be used directly as the native type. An interface proxy wraps it in a native object that delegates method calls back to the interpreter.

The visitor is the current interpreter for dispatching callbacks. The instance is the D4rt interpreted instance that provides the implementation.

Implementation

typedef InterfaceProxyFactory =
    Object? Function(InterpreterVisitor visitor, InterpretedInstance instance);