call method
Object?
call(
- InterpreterVisitor visitor,
- List<
Object?> positionalArguments, [ - Map<
String, Object?> namedArguments = const {}, - List<
RuntimeType> ? typeArguments,
override
Implementation
@override
Object? call(InterpreterVisitor visitor, List<Object?> positionalArguments,
[Map<String, Object?> namedArguments = const {},
List<RuntimeType>? typeArguments]) {
try {
// Call the adapter with the visitor and arguments
return _adapter(
visitor, positionalArguments, namedArguments, typeArguments);
} on ArgumentError catch (e) {
// Convert native ArgumentError to RuntimeError
throw RuntimeD4rtException(
"Invalid arguments for bridged static method '${_bridgedClass.name}.$_methodName': ${e.message}");
} catch (e, s) {
// Handle other native errors
Logger.error(
"[BridgedStaticMethodCallable] Native exception during call to '${_bridgedClass.name}.$_methodName': $e\n$s");
throw RuntimeD4rtException(
"Native error in bridged static method '${_bridgedClass.name}.$_methodName': $e", originalException: e);
}
}