Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(729)

Unified Diff: pkg/smoke/lib/mirrors.dart

Issue 204143002: Changes in smoke in preparation of polymer's codegen: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/smoke/lib/codegen/recorder.dart ('k') | pkg/smoke/lib/smoke.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/smoke/lib/mirrors.dart
diff --git a/pkg/smoke/lib/mirrors.dart b/pkg/smoke/lib/mirrors.dart
index 4048aae776af947957faf1d8fe94e31bcb4cbd8d..d30baa2ef90df4df998d6cbf1fedc2faf314a9aa 100644
--- a/pkg/smoke/lib/mirrors.dart
+++ b/pkg/smoke/lib/mirrors.dart
@@ -180,6 +180,8 @@ class ReflectiveTypeInspectorService implements TypeInspectorService {
isMethod = true;
}
+ if (options.matches != null && !options.matches(name)) continue;
+
var annotations =
member.metadata.map((m) => m.reflectee).toList();
if (options.withAnnotations != null &&
@@ -298,17 +300,20 @@ class _MirrorDeclaration implements Declaration {
/// List of annotations in this declaration.
List get annotations => _original.metadata.map((a) => a.reflectee).toList();
- String toString() {
- return (new StringBuffer()
- ..write('[declaration ')
- ..write(name)
- ..write(isField ? ' (field) '
- : (isProperty ? ' (property) ' : ' (method) '))
- ..write(isFinal ? 'final ' : '')
- ..write(isStatic ? 'static ' : '')
- ..write(annotations)
- ..write(']')).toString();
- }
+ int get hashCode => name.hashCode;
+ operator ==(other) => other is Declaration && name == other.name &&
+ kind == other.kind && isFinal == other.isFinal &&
+ type == other.type && isStatic == other.isStatic &&
+ compareLists(annotations, other.annotations);
+ String toString() => (new StringBuffer()
+ ..write('(mirror-based-declaration ')
+ ..write(name)
+ ..write(isField ? ' (field) '
+ : (isProperty ? ' (property) ' : ' (method) '))
+ ..write(isFinal ? 'final ' : '')
+ ..write(isStatic ? 'static ' : '')
+ ..write(annotations)
+ ..write(')')).toString();
}
class _MethodClosure extends Function {
« no previous file with comments | « pkg/smoke/lib/codegen/recorder.dart ('k') | pkg/smoke/lib/smoke.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698