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

Side by Side Diff: pkg/docgen/lib/src/models/variable.dart

Issue 320323004: Fix for link resolution of docgen (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library docgen.models.variable; 5 library docgen.models.variable;
6 6
7 import '../exports/source_mirrors.dart'; 7 import '../exports/source_mirrors.dart';
8 8
9 import '../library_helpers.dart'; 9 import '../library_helpers.dart';
10 10
11 import 'class.dart'; 11 import 'class.dart';
12 import 'doc_gen_type.dart'; 12 import 'doc_gen_type.dart';
13 import 'dummy_mirror.dart'; 13 import 'dummy_mirror.dart';
14 import 'indexable.dart'; 14 import 'indexable.dart';
15 import 'owned_indexable.dart'; 15 import 'owned_indexable.dart';
16 16
17 17
18 /// A class containing properties of a Dart variable. 18 /// A class containing properties of a Dart variable.
19 class Variable extends OwnedIndexable<VariableMirror> { 19 class Variable extends OwnedIndexable<VariableMirror> {
20 final bool isFinal; 20 final bool isFinal;
21 final bool isStatic; 21 final bool isStatic;
22 final bool isConst; 22 final bool isConst;
23 final DocGenType type; 23 final DocGenType type;
24 final String name; 24 final String name;
25 25
26 factory Variable(String name, VariableMirror mirror, Indexable owner) { 26 factory Variable(String name, VariableMirror mirror, Indexable owner) {
27 var variable = getDocgenObject(mirror); 27 var variable = getDocgenObject(mirror, owner);
28 if (variable is DummyMirror) { 28 if (variable is DummyMirror) {
29 return new Variable._(name, mirror, owner); 29 return new Variable._(name, mirror, owner);
30 } 30 }
31 return variable; 31 return variable;
32 } 32 }
33 33
34 Variable._(this.name, VariableMirror mirror, Indexable owner) 34 Variable._(this.name, VariableMirror mirror, Indexable owner)
35 : isFinal = mirror.isFinal, 35 : isFinal = mirror.isFinal,
36 isStatic = mirror.isStatic, 36 isStatic = mirror.isStatic,
37 isConst = mirror.isConst, 37 isConst = mirror.isConst,
(...skipping 17 matching lines...) Expand all
55 String get comment { 55 String get comment {
56 if (commentField != null) return commentField; 56 if (commentField != null) return commentField;
57 if (owner is Class) { 57 if (owner is Class) {
58 (owner as Class).ensureComments(); 58 (owner as Class).ensureComments();
59 } 59 }
60 return super.comment; 60 return super.comment;
61 } 61 }
62 62
63 bool isValidMirror(DeclarationMirror mirror) => mirror is VariableMirror; 63 bool isValidMirror(DeclarationMirror mirror) => mirror is VariableMirror;
64 } 64 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698