dart / 1 / dart-mirrors / objectmirror / delegate.html

delegate abstract method

dynamic delegate(Invocation invocation)

Performs invocation on reflectee.

Equivalent to

if (invocation.isGetter) {
  return this.getField(invocation.memberName).reflectee;
} else if (invocation.isSetter) {
  return this.setField(invocation.memberName,
                       invocation.positionArguments[0]).reflectee;
} else {
  return this.invoke(invocation.memberName,
                     invocation.positionalArguments,
                     invocation.namedArguments).reflectee;
}

Source

delegate(Invocation invocation);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-mirrors/ObjectMirror/delegate.html