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

Unified Diff: pkg/docgen/lib/src/models/generic.dart

Issue 242363004: pkg/docgen: moved model classes into minilibs (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: cl nits Created 6 years, 8 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: pkg/docgen/lib/src/models/generic.dart
diff --git a/pkg/docgen/lib/src/models/generic.dart b/pkg/docgen/lib/src/models/generic.dart
new file mode 100644
index 0000000000000000000000000000000000000000..46a48a11b35e96e8f899d95c3e2f31f059e753b3
--- /dev/null
+++ b/pkg/docgen/lib/src/models/generic.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library docgen.models.generic;
+
+import '../exports/source_mirrors.dart';
+import '../exports/mirrors_util.dart' as dart2js_util;
+
+import 'mirror_based.dart';
+
+/// A Docgen wrapper around the dart2js mirror for a generic type.
+class Generic extends MirrorBased<TypeVariableMirror> {
+ final TypeVariableMirror mirror;
+
+ Generic(this.mirror);
+
+ Map toMap() => {
+ 'name': dart2js_util.nameOf(mirror),
+ 'type': dart2js_util.qualifiedNameOf(mirror.upperBound)
+ };
+}

Powered by Google App Engine
This is Rietveld 408576698