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

Unified Diff: pkg/docgen/lib/src/models/typedef.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/parameter.dart ('k') | pkg/docgen/lib/src/models/variable.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/lib/src/models/typedef.dart
diff --git a/pkg/docgen/lib/src/models/typedef.dart b/pkg/docgen/lib/src/models/typedef.dart
deleted file mode 100644
index 17e4208aa906012073d01e8b3033a02feaedf821..0000000000000000000000000000000000000000
--- a/pkg/docgen/lib/src/models/typedef.dart
+++ /dev/null
@@ -1,65 +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.typedef;
-
-import '../exports/source_mirrors.dart';
-
-import '../library_helpers.dart';
-
-import 'dummy_mirror.dart';
-import 'library.dart';
-import 'model_helpers.dart';
-import 'generic.dart';
-import 'parameter.dart';
-import 'owned_indexable.dart';
-
-class Typedef extends OwnedIndexable<TypedefMirror> {
- final String returnType;
-
- final Map<String, Parameter> parameters;
-
- /// Generic information about the typedef.
- final Map<String, Generic> generics;
-
- /// Returns the [Library] for the given [mirror] if it has already been
- /// created, else creates it.
- factory Typedef(TypedefMirror mirror, Library owningLibrary) {
- var aTypedef = getDocgenObject(mirror, owningLibrary);
- if (aTypedef is DummyMirror) {
- aTypedef = new Typedef._(mirror, owningLibrary);
- }
- return aTypedef;
- }
-
- Typedef._(TypedefMirror mirror, Library owningLibrary)
- : returnType = getDocgenObject(mirror.referent.returnType).docName,
- generics = createGenerics(mirror),
- parameters = createParameters(mirror.referent.parameters,
- owningLibrary),
- super(mirror, owningLibrary);
-
- Map toMap() {
- var map = {
- 'name': name,
- 'qualifiedName': qualifiedName,
- 'comment': comment,
- 'return': returnType,
- 'parameters': recurseMap(parameters),
- 'annotations': annotations.map((a) => a.toMap()).toList(),
- 'generics': recurseMap(generics)
- };
-
- // Typedef is displayed on the library page as a class, so a preview is
- // added manually
- var pre = preview;
- if (pre != null) map['preview'] = pre;
-
- return map;
- }
-
- String get typeName => 'typedef';
-
- bool isValidMirror(DeclarationMirror mirror) => mirror is TypedefMirror;
-}
« no previous file with comments | « pkg/docgen/lib/src/models/parameter.dart ('k') | pkg/docgen/lib/src/models/variable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698