OLD | NEW |
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 analyzer.src.dart.element.element; | 5 library analyzer.src.dart.element.element; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import 'dart:math' show min; | 8 import 'dart:math' show min; |
9 | 9 |
10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 */ | 467 */ |
468 List<MethodElement> _methods; | 468 List<MethodElement> _methods; |
469 | 469 |
470 /** | 470 /** |
471 * A flag indicating whether the types associated with the instance members of | 471 * A flag indicating whether the types associated with the instance members of |
472 * this class have been inferred. | 472 * this class have been inferred. |
473 */ | 473 */ |
474 bool _hasBeenInferred = false; | 474 bool _hasBeenInferred = false; |
475 | 475 |
476 /** | 476 /** |
| 477 * The version of this element. The version is changed when the element is |
| 478 * incrementally updated, so that its lists of constructors, accessors and |
| 479 * methods might be different. |
| 480 */ |
| 481 int version = 0; |
| 482 |
| 483 /** |
477 * Initialize a newly created class element to have the given [name] at the | 484 * Initialize a newly created class element to have the given [name] at the |
478 * given [offset] in the file that contains the declaration of this element. | 485 * given [offset] in the file that contains the declaration of this element. |
479 */ | 486 */ |
480 ClassElementImpl(String name, int offset) | 487 ClassElementImpl(String name, int offset) |
481 : _unlinkedClass = null, | 488 : _unlinkedClass = null, |
482 super(name, offset); | 489 super(name, offset); |
483 | 490 |
484 /** | 491 /** |
485 * Initialize a newly created class element to have the given [name]. | 492 * Initialize a newly created class element to have the given [name]. |
486 */ | 493 */ |
(...skipping 7991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8478 | 8485 |
8479 @override | 8486 @override |
8480 void visitElement(Element element) { | 8487 void visitElement(Element element) { |
8481 int offset = element.nameOffset; | 8488 int offset = element.nameOffset; |
8482 if (offset != -1) { | 8489 if (offset != -1) { |
8483 map[offset] = element; | 8490 map[offset] = element; |
8484 } | 8491 } |
8485 super.visitElement(element); | 8492 super.visitElement(element); |
8486 } | 8493 } |
8487 } | 8494 } |
OLD | NEW |