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

Unified Diff: dart/sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart

Issue 23455028: Mirrors overhaul. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r29550. Created 7 years, 2 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
Index: dart/sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart
diff --git a/dart/sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart b/dart/sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart
index c218b6cff637ecc1b705b31f73d72d4fd7483450..67f4fb468bdf894e1c1eb2d374e2a7c469c090fa 100755
--- a/dart/sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart
+++ b/dart/sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart
@@ -62,14 +62,12 @@ void _serializeObject(String name, Object o, JsonPrinter printer) {
void determineAllMembers(ClassMirror classMirror,
List<String> members) {
- for(Symbol getterName in classMirror.getters.keys) {
- if (!members.contains(MirrorSystem.getName(getterName))) {
- members.add(MirrorSystem.getName(getterName));
- }
- }
- for(Symbol fieldName in classMirror.variables.keys) {
- if (!members.contains(MirrorSystem.getName(fieldName))) {
- members.add(MirrorSystem.getName(fieldName));
+ for (var mirror in classMirror.declarations.values) {
+ if (mirror is VariableMirror ||
+ (mirror is MethodMirror && mirror.isGetter)) {
+ if (!members.contains(MirrorSystem.getName(mirror.simpleName))) {
+ members.add(MirrorSystem.getName(mirror.simpleName));
+ }
}
}
if (classMirror.superclass != null &&
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart ('k') | dart/sdk/lib/_internal/lib/js_mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698