| Index: lib/mirrors/mirrors.dart
|
| ===================================================================
|
| --- lib/mirrors/mirrors.dart (revision 9796)
|
| +++ lib/mirrors/mirrors.dart (working copy)
|
| @@ -157,6 +157,38 @@
|
| }
|
|
|
| /**
|
| + * A [ClosureMirror] reflects a closure. Closures are special, because we do not
|
| + * wish to reflect the internals of a particular closure implementation. And
|
| + * yet, we need access to details of the closure internals - for example, its
|
| + * enclosing context and its source code.
|
| + */
|
| +interface ClosureMirror extends InstanceMirror {
|
| +
|
| + /**
|
| + * Return the source code for the closure, if available.
|
| + */
|
| + String source();
|
| +
|
| + /**
|
| + * Call the closure. The arguments given in the descriptor need to be
|
| + * ObjectMirrors or values. Asynchronous.
|
| + */
|
| + Future<ObjectMirror> apply(List<Object> positionalArguments,
|
| + [Map<String,Object> namedArguments]);
|
| +
|
| + /**
|
| + * Look up the value of name in the scope of the closure. The result is a
|
| + * mirror on that value. Asynchronous.
|
| + */
|
| + Future<ObjectMirror> findInContext(String name);
|
| +
|
| + /**
|
| + * Return a mirror on the function of this closure.
|
| + */
|
| + MethodMirror function();
|
| +}
|
| +
|
| +/**
|
| * A [TypeMirror] reflects a Dart language class, interface, typedef
|
| * or type variable.
|
| */
|
|
|