Chromium Code Reviews| Index: pkg/docgen/lib/docgen.dart |
| diff --git a/pkg/docgen/lib/docgen.dart b/pkg/docgen/lib/docgen.dart |
| index 72588c80027d366b598c35327a2fff0f97300f6c..d80d64baf368c09758f117a5ea24e79b086c352f 100644 |
| --- a/pkg/docgen/lib/docgen.dart |
| +++ b/pkg/docgen/lib/docgen.dart |
| @@ -620,13 +620,24 @@ class Class extends Indexable { |
| } |
| } |
| + /** |
| + * If a class extends a private superclass, find the closest public superclass |
| + * of the private superclass. |
| + */ |
| + String validSuperclass() { |
| + if (superclass == null) return ""; |
|
Bob Nystrom
2013/08/01 23:31:40
Is there a reason to return "" instead of "Object"
janicejl
2013/08/02 00:49:09
Done.
|
| + else { |
|
Bob Nystrom
2013/08/01 23:31:40
"else" isn't needed here.
janicejl
2013/08/02 00:49:09
Done.
|
| + if (_filterPrivate(superclass)) return superclass.qualifiedName; |
|
Bob Nystrom
2013/08/01 23:31:40
"filter" is a bit confusing here. I would expect i
janicejl
2013/08/02 00:49:09
Done.
|
| + else return superclass.validSuperclass(); |
|
Bob Nystrom
2013/08/01 23:31:40
"else" isn't needed here.
janicejl
2013/08/02 00:49:09
Done.
|
| + } |
| + } |
| + |
| /// Generates a map describing the [Class] object. |
| Map toMap() => { |
| 'name': name, |
| 'qualifiedname': qualifiedName, |
| 'comment': comment, |
| - 'superclass': superclass == null ? "" : (_filterPrivate(superclass)) ? |
| - superclass.qualifiedName : "", |
| + 'superclass': validSuperclass(), |
| 'implements': new List.from(interfaces.where((e) => _filterPrivate(e)) |
| .map((e) => e.qualifiedName)), |
| 'subclass': new List.from(subclasses), |