$getProperty method

  1. @override
$Value? $getProperty(
  1. Runtime runtime,
  2. String identifier
)
inherited

Get a property by identifier on this instance

Implementation

@override
$Value? $getProperty(Runtime runtime, String identifier) {
  final getter = evalClass.getters[identifier];
  if (getter == null) {
    final method = evalClass.methods[identifier];
    if (method == null) {
      if (evalSuperclass == null) {
        return getCoreObjectProperty(identifier);
      }
      return evalSuperclass!.$getProperty(runtime, identifier);
    }
    return EvalStaticFunctionPtr(this, method);
  }
  runtime.args.add(this);
  runtime.bridgeCall(getter);
  return runtime.returnValue as $Value;
}