| Index: runtime/lib/mirrors_impl.dart
|
| ===================================================================
|
| --- runtime/lib/mirrors_impl.dart (revision 23928)
|
| +++ runtime/lib/mirrors_impl.dart (working copy)
|
| @@ -70,6 +70,10 @@
|
| return result;
|
| }
|
|
|
| +List<InstanceMirror> _metadata(mirror)
|
| + native 'Mirrors_metadata';
|
| +
|
| +
|
| class _LocalMirrorSystemImpl extends MirrorSystem {
|
| // Change parameter back to "this.libraries" when native code is changed.
|
| _LocalMirrorSystemImpl(Map<String, LibraryMirror> libraries, this.isolate)
|
| @@ -602,6 +606,10 @@
|
| }
|
| }
|
|
|
| + // get the metadata objects, convert them into InstanceMirrors using
|
| + // reflect() and then make them into a Dart list
|
| + List<InstanceMirror> get metadata => _metadata(this).map(reflect).toList();
|
| +
|
| static _invokeConstructor(ref, constructorName, positionalArguments, async)
|
| native 'LocalClassMirrorImpl_invokeConstructor';
|
| }
|
| @@ -704,6 +712,10 @@
|
| return _upperBound;
|
| }
|
|
|
| + // get the metadata objects, convert them into InstanceMirrors using
|
| + // reflect() and then make them into a Dart list
|
| + List<InstanceMirror> get metadata => _metadata(this).map(reflect).toList();
|
| +
|
| String toString() => "TypeVariableMirror on '$simpleName'";
|
| }
|
|
|
| @@ -843,6 +855,10 @@
|
| return _variables;
|
| }
|
|
|
| + // get the metadata objects, convert them into InstanceMirrors using
|
| + // reflect() and then make them into a Dart list
|
| + List<InstanceMirror> get metadata => _metadata(this).map(reflect).toList();
|
| +
|
| String toString() => "LibraryMirror on '$simpleName'";
|
| }
|
|
|
| @@ -943,6 +959,13 @@
|
| final bool isRedirectingConstructor;
|
| final bool isFactoryConstructor;
|
|
|
| + List<InstanceMirror> get metadata {
|
| + owner; // ensure owner is computed
|
| + // get the metadata objects, convert them into InstanceMirrors using
|
| + // reflect() and then make them into a Dart list
|
| + return _metadata(this).map(reflect).toList();
|
| + }
|
| +
|
| String toString() => "MethodMirror on '$simpleName'";
|
| }
|
|
|
| @@ -997,6 +1020,13 @@
|
| final bool isStatic;
|
| final bool isFinal;
|
|
|
| + List<InstanceMirror> get metadata {
|
| + owner; // ensure owner is computed
|
| + // get the metadata objects, convert them into InstanceMirrors using
|
| + // reflect() and then make them into a Dart list
|
| + return _metadata(this).map(reflect).toList();
|
| + }
|
| +
|
| String toString() => "VariableMirror on '$simpleName'";
|
| }
|
|
|
|
|