findInstanceGetter method

InterpretedFunction? findInstanceGetter(
  1. String name
)

Implementation

InterpretedFunction? findInstanceGetter(String name) {
  final cached = _getterResolutionCache[name];
  if (cached != null) return cached;

  final local = getters[name];
  if (local != null) return _getterResolutionCache[name] = local;

  // Check applied mixins in reverse order
  for (int i = mixins.length - 1; i >= 0; i--) {
    final mixinGetter = mixins[i].findInstanceGetter(name);
    if (mixinGetter != null) return _getterResolutionCache[name] = mixinGetter;
  }

  if (superclass != null) {
    final superGetter = superclass!.findInstanceGetter(name);
    if (superGetter != null) return _getterResolutionCache[name] = superGetter;
    return null;
  }

  // If not found in Dart hierarchy, check bridged superclass
  if (bridgedSuperclass != null) {
    final getterAdapter = bridgedSuperclass!.findInstanceGetterAdapter(name);
    if (getterAdapter != null) {
      return null;
    }
  }

  return null;
}