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

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

Issue 1364553002: remove docgen source and targets from build (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: remove scripts Created 5 years, 3 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
« no previous file with comments | « pkg/docgen/lib/src/models/closure.dart ('k') | pkg/docgen/lib/src/models/dummy_mirror.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/lib/src/models/doc_gen_type.dart
diff --git a/pkg/docgen/lib/src/models/doc_gen_type.dart b/pkg/docgen/lib/src/models/doc_gen_type.dart
deleted file mode 100644
index 47fc99b2be1d982e802e4237e7bf42b902125041..0000000000000000000000000000000000000000
--- a/pkg/docgen/lib/src/models/doc_gen_type.dart
+++ /dev/null
@@ -1,66 +0,0 @@
-// 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.doc_gen_type;
-
-import '../exports/source_mirrors.dart';
-
-import '../library_helpers.dart';
-
-import 'library.dart';
-import 'mirror_based.dart';
-
-/// Docgen wrapper around the mirror for a return type, and/or its generic
-/// type parameters.
-///
-/// Return types are of a form [outer]<[inner]>.
-/// If there is no [inner] part, [inner] will be an empty list.
-///
-/// For example:
-/// int size()
-/// "return" :
-/// - "outer" : "dart:core.int"
-/// "inner" :
-///
-/// List<String> toList()
-/// "return" :
-/// - "outer" : "dart:core.List"
-/// "inner" :
-/// - "outer" : "dart:core.String"
-/// "inner" :
-///
-/// Map<String, List<int>>
-/// "return" :
-/// - "outer" : "dart:core.Map"
-/// "inner" :
-/// - "outer" : "dart:core.String"
-/// "inner" :
-/// - "outer" : "dart:core.List"
-/// "inner" :
-/// - "outer" : "dart:core.int"
-/// "inner" :
-class DocGenType extends MirrorBased {
- final TypeMirror mirror;
- final Library owningLibrary;
-
- DocGenType(this.mirror, this.owningLibrary);
-
- Map toMap() {
- var result = getDocgenObject(mirror, owningLibrary);
- return {
- // We may encounter types whose corresponding library has not been
- // processed yet, so look up with the owningLibrary at the last moment.
- 'outer': result.packagePrefix + result.docName,
- 'inner': _createTypeGenerics(mirror).map((e) => e.toMap()).toList(),
- };
- }
-
- /// Returns a list of [DocGenType] objects constructed from TypeMirrors.
- List<DocGenType> _createTypeGenerics(TypeMirror mirror) {
- if (mirror is! ClassMirror) return [];
- return mirror.typeArguments
- .map((e) => new DocGenType(e, owningLibrary))
- .toList();
- }
-}
« no previous file with comments | « pkg/docgen/lib/src/models/closure.dart ('k') | pkg/docgen/lib/src/models/dummy_mirror.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698