findInstanceMethod method

InterpretedFunction? findInstanceMethod(
  1. String name
)

The instance method name, searching this enum then its mixins.

Same order as InterpretedEnumValue.get resolves one — own members first, then mixins in reverse declaration order so the last applied wins.

Implementation

InterpretedFunction? findInstanceMethod(String name) {
  final own = methods[name];
  if (own != null) return own;
  for (final mixin in mixins.reversed) {
    final fromMixin = mixin.methods[name];
    if (fromMixin != null) return fromMixin;
  }
  return null;
}