| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 1 library docgen.models; | 5 library docgen.models; |
| 2 | 6 |
| 3 import '../../../../sdk/lib/_internal/compiler/implementation/mirrors/source_mir
rors.dart'; | 7 import '../../../../sdk/lib/_internal/compiler/implementation/mirrors/source_mir
rors.dart'; |
| 4 import '../../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_ut
il.dart' | 8 import '../../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_ut
il.dart' |
| 5 as dart2js_util; | 9 as dart2js_util; |
| 6 | 10 |
| 7 /// Docgen representation of an item to be documented, that wraps around a | 11 /// Docgen representation of an item to be documented, that wraps around a |
| 8 /// dart2js mirror. | 12 /// dart2js mirror. |
| 9 abstract class MirrorBased { | 13 abstract class MirrorBased { |
| 10 /// The original dart2js mirror around which this object wraps. | 14 /// The original dart2js mirror around which this object wraps. |
| 11 DeclarationMirror get mirror; | 15 DeclarationMirror get mirror; |
| 12 } | 16 } |
| 13 | 17 |
| 14 /// A Docgen wrapper around the dart2js mirror for a generic type. | 18 /// A Docgen wrapper around the dart2js mirror for a generic type. |
| 15 class Generic extends MirrorBased { | 19 class Generic extends MirrorBased { |
| 16 final TypeVariableMirror mirror; | 20 final TypeVariableMirror mirror; |
| 17 | 21 |
| 18 Generic(this.mirror); | 22 Generic(this.mirror); |
| 19 | 23 |
| 20 Map toMap() => { | 24 Map toMap() => { |
| 21 'name': dart2js_util.nameOf(mirror), | 25 'name': dart2js_util.nameOf(mirror), |
| 22 'type': dart2js_util.qualifiedNameOf(mirror.upperBound) | 26 'type': dart2js_util.qualifiedNameOf(mirror.upperBound) |
| 23 }; | 27 }; |
| 24 } | 28 } |
| OLD | NEW |