| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 entities; | 5 library entities; |
| 6 | 6 |
| 7 import 'elements.dart' show Entity; | 7 import 'elements.dart' show Entity; |
| 8 | 8 |
| 9 /// Stripped down super interface for class like entities. | 9 /// Stripped down super interface for class like entities. |
| 10 /// | 10 /// |
| 11 /// Currently only [ClassElement] but later also kernel based Dart classes | 11 /// Currently only [ClassElement] but later also kernel based Dart classes |
| 12 /// and/or Dart-in-JS classes. | 12 /// and/or Dart-in-JS classes. |
| 13 abstract class ClassEntity extends Entity { | 13 abstract class ClassEntity extends Entity { |
| 14 bool get isClosure; | 14 bool get isClosure; |
| 15 void forEachInstanceField(f(ClassEntity cls, FieldEntity field), | 15 void forEachInstanceField(f(ClassEntity cls, FieldEntity field), |
| 16 {bool includeSuperAndInjectedMembers: false}); | 16 {bool includeSuperAndInjectedMembers: false}); |
| 17 } | 17 } |
| 18 | 18 |
| 19 /// Stripped down super interface for member like entities, that is, | 19 /// Stripped down super interface for member like entities, that is, |
| 20 /// constructors, methods, fields etc. | 20 /// constructors, methods, fields etc. |
| 21 /// | 21 /// |
| 22 /// Currently only [MemberElement] but later also kernel based Dart members | 22 /// Currently only [MemberElement] but later also kernel based Dart members |
| 23 /// and/or Dart-in-JS properties. | 23 /// and/or Dart-in-JS properties. |
| 24 abstract class MemberEntity extends Entity { | 24 abstract class MemberEntity extends Entity { |
| 25 bool get isField; | 25 bool get isField; |
| 26 bool get isFunction; | 26 bool get isFunction; |
| 27 bool get isGetter; | 27 bool get isGetter; |
| 28 bool get isSetter; |
| 28 bool get isAssignable; | 29 bool get isAssignable; |
| 29 ClassEntity get enclosingClass; | 30 ClassEntity get enclosingClass; |
| 30 } | 31 } |
| 31 | 32 |
| 32 /// Stripped down super interface for field like entities. | 33 /// Stripped down super interface for field like entities. |
| 33 /// | 34 /// |
| 34 /// Currently only [FieldElement] but later also kernel based Dart fields | 35 /// Currently only [FieldElement] but later also kernel based Dart fields |
| 35 /// and/or Dart-in-JS field-like properties. | 36 /// and/or Dart-in-JS field-like properties. |
| 36 abstract class FieldEntity extends MemberEntity {} | 37 abstract class FieldEntity extends MemberEntity {} |
| 37 | 38 |
| 38 /// Stripped down super interface for function like entities. | 39 /// Stripped down super interface for function like entities. |
| 39 /// | 40 /// |
| 40 /// Currently only [FieldElement] but later also kernel based Dart constructors | 41 /// Currently only [FieldElement] but later also kernel based Dart constructors |
| 41 /// and methods and/or Dart-in-JS function-like properties. | 42 /// and methods and/or Dart-in-JS function-like properties. |
| 42 abstract class FunctionEntity extends MemberEntity {} | 43 abstract class FunctionEntity extends MemberEntity {} |
| OLD | NEW |