| 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), | |
| 16 {bool includeSuperAndInjectedMembers: false}); | |
| 17 } | 15 } |
| 18 | 16 |
| 19 abstract class TypeVariableEntity extends Entity { | 17 abstract class TypeVariableEntity extends Entity { |
| 20 Entity get typeDeclaration; | 18 Entity get typeDeclaration; |
| 21 int get index; | 19 int get index; |
| 22 } | 20 } |
| 23 | 21 |
| 24 /// Stripped down super interface for member like entities, that is, | 22 /// Stripped down super interface for member like entities, that is, |
| 25 /// constructors, methods, fields etc. | 23 /// constructors, methods, fields etc. |
| 26 /// | 24 /// |
| 27 /// Currently only [MemberElement] but later also kernel based Dart members | 25 /// Currently only [MemberElement] but later also kernel based Dart members |
| 28 /// and/or Dart-in-JS properties. | 26 /// and/or Dart-in-JS properties. |
| 29 abstract class MemberEntity extends Entity { | 27 abstract class MemberEntity extends Entity { |
| 28 bool get isConstructor; |
| 30 bool get isField; | 29 bool get isField; |
| 31 bool get isFunction; | 30 bool get isFunction; |
| 32 bool get isGetter; | 31 bool get isGetter; |
| 33 bool get isSetter; | 32 bool get isSetter; |
| 34 bool get isAssignable; | 33 bool get isAssignable; |
| 35 ClassEntity get enclosingClass; | 34 ClassEntity get enclosingClass; |
| 36 } | 35 } |
| 37 | 36 |
| 38 /// Stripped down super interface for field like entities. | 37 /// Stripped down super interface for field like entities. |
| 39 /// | 38 /// |
| 40 /// Currently only [FieldElement] but later also kernel based Dart fields | 39 /// Currently only [FieldElement] but later also kernel based Dart fields |
| 41 /// and/or Dart-in-JS field-like properties. | 40 /// and/or Dart-in-JS field-like properties. |
| 42 abstract class FieldEntity extends MemberEntity {} | 41 abstract class FieldEntity extends MemberEntity {} |
| 43 | 42 |
| 44 /// Stripped down super interface for function like entities. | 43 /// Stripped down super interface for function like entities. |
| 45 /// | 44 /// |
| 46 /// Currently only [FieldElement] but later also kernel based Dart constructors | 45 /// Currently only [FieldElement] but later also kernel based Dart constructors |
| 47 /// and methods and/or Dart-in-JS function-like properties. | 46 /// and methods and/or Dart-in-JS function-like properties. |
| 48 abstract class FunctionEntity extends MemberEntity {} | 47 abstract class FunctionEntity extends MemberEntity {} |
| OLD | NEW |