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

Side by Side Diff: pkg/docgen/lib/src/models/closure.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, 2 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 unified diff | Download patch
« no previous file with comments | « pkg/docgen/lib/src/models/class.dart ('k') | pkg/docgen/lib/src/models/doc_gen_type.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
5 library docgen.models.closure;
6
7 import '../exports/source_mirrors.dart';
8
9 import 'doc_gen_type.dart';
10 import 'indexable.dart';
11 import 'mirror_based.dart';
12 import 'model_helpers.dart';
13 import 'parameter.dart';
14
15 /// A class containing the properties of a function to be called (used in our
16 /// case specifically to illustrate evidence of the type of function for a
17 /// parameter).
18 class Closure extends MirrorBased<FunctionTypeMirror> {
19
20 /// Parameters for this method.
21 final Map<String, Parameter> parameters;
22 final DocGenType returnType;
23 final FunctionTypeMirror mirror;
24
25 Closure(FunctionTypeMirror mirror, Indexable owner)
26 : returnType = new DocGenType(mirror.returnType, owner.owningLibrary),
27 parameters = createParameters(mirror.parameters, owner),
28 mirror = mirror;
29
30 /// Generates a map describing the [Method] object.
31 Map toMap() => {
32 'return': [returnType.toMap()],
33 'parameters': recurseMap(parameters),
34 };
35 }
OLDNEW
« no previous file with comments | « pkg/docgen/lib/src/models/class.dart ('k') | pkg/docgen/lib/src/models/doc_gen_type.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698