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

Side by Side Diff: pkg/docgen/lib/docgen.dart

Issue 22232002: Fixed toMap() for subclasses (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * **docgen** is a tool for creating machine readable representations of Dart 6 * **docgen** is a tool for creating machine readable representations of Dart
7 * code metadata, including: classes, members, comments and annotations. 7 * code metadata, including: classes, members, comments and annotations.
8 * 8 *
9 * docgen is run on a `.dart` file or a directory containing `.dart` files. 9 * docgen is run on a `.dart` file or a directory containing `.dart` files.
10 * 10 *
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 } 664 }
665 665
666 /// Generates a map describing the [Class] object. 666 /// Generates a map describing the [Class] object.
667 Map toMap() => { 667 Map toMap() => {
668 'name': name, 668 'name': name,
669 'qualifiedname': qualifiedName, 669 'qualifiedname': qualifiedName,
670 'comment': comment, 670 'comment': comment,
671 'superclass': validSuperclass(), 671 'superclass': validSuperclass(),
672 'implements': interfaces.where(_isVisible) 672 'implements': interfaces.where(_isVisible)
673 .map((e) => e.qualifiedName).toList(), 673 .map((e) => e.qualifiedName).toList(),
674 'subclass': subclasses, 674 'subclass': subclasses.toList(),
675 'variables': recurseMap(variables), 675 'variables': recurseMap(variables),
676 'inheritedvariables': recurseMap(inheritedVariables), 676 'inheritedvariables': recurseMap(inheritedVariables),
677 'methods': methods.toMap(), 677 'methods': methods.toMap(),
678 'inheritedmethods': inheritedMethods.toMap(), 678 'inheritedmethods': inheritedMethods.toMap(),
679 'annotations': annotations.map((a) => a.toMap()).toList(), 679 'annotations': annotations.map((a) => a.toMap()).toList(),
680 'generics': recurseMap(generics) 680 'generics': recurseMap(generics)
681 }; 681 };
682 } 682 }
683 683
684 /** 684 /**
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 String qualifiedName; 1019 String qualifiedName;
1020 List<String> parameters; 1020 List<String> parameters;
1021 1021
1022 Annotation(this.qualifiedName, this.parameters); 1022 Annotation(this.qualifiedName, this.parameters);
1023 1023
1024 Map toMap() => { 1024 Map toMap() => {
1025 'name': qualifiedName, 1025 'name': qualifiedName,
1026 'parameters': parameters 1026 'parameters': parameters
1027 }; 1027 };
1028 } 1028 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698