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