OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 /// Mixins that implement convenience methods on [Element] subclasses. | 5 /// Mixins that implement convenience methods on [Element] subclasses. |
6 | 6 |
7 library elements.common; | 7 library elements.common; |
8 | 8 |
9 import '../common/names.dart' show Names, Uris; | 9 import '../common/names.dart' show Names, Uris; |
10 import '../core_types.dart' show CoreClasses; | 10 import '../core_types.dart' show CoreClasses; |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 | 587 |
588 @override | 588 @override |
589 void forEachLocalMember(void f(Element member)) { | 589 void forEachLocalMember(void f(Element member)) { |
590 constructors.forEach(f); | 590 constructors.forEach(f); |
591 if (mixin != null) | 591 if (mixin != null) |
592 mixin.forEachLocalMember((Element mixedInElement) { | 592 mixin.forEachLocalMember((Element mixedInElement) { |
593 if (mixedInElement.isInstanceMember) f(mixedInElement); | 593 if (mixedInElement.isInstanceMember) f(mixedInElement); |
594 }); | 594 }); |
595 } | 595 } |
596 } | 596 } |
| 597 |
| 598 abstract class AbstractFieldElementCommon implements AbstractFieldElement { |
| 599 @override |
| 600 bool get isInstanceMember { |
| 601 return isClassMember && !isStatic; |
| 602 } |
| 603 |
| 604 @override |
| 605 bool get isAbstract { |
| 606 return getter != null && getter.isAbstract || |
| 607 setter != null && setter.isAbstract; |
| 608 } |
| 609 } |
OLD | NEW |