| 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 fasta.class_builder; | 5 library fasta.class_builder; |
| 6 | 6 |
| 7 import 'builder.dart' show | 7 import 'builder.dart' show |
| 8 Builder, | 8 Builder, |
| 9 ConstructorReferenceBuilder, | 9 ConstructorReferenceBuilder, |
| 10 LibraryBuilder, | 10 LibraryBuilder, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 List<T> interfaces; | 26 List<T> interfaces; |
| 27 | 27 |
| 28 final Map<String, Builder> members; | 28 final Map<String, Builder> members; |
| 29 | 29 |
| 30 ClassBuilder( | 30 ClassBuilder( |
| 31 List<MetadataBuilder> metadata, int modifiers, | 31 List<MetadataBuilder> metadata, int modifiers, |
| 32 String name, this.typeVariables, this.supertype, this.interfaces, | 32 String name, this.typeVariables, this.supertype, this.interfaces, |
| 33 this.members, LibraryBuilder parent, int charOffset) | 33 this.members, LibraryBuilder parent, int charOffset) |
| 34 : super(metadata, modifiers, name, parent, charOffset); | 34 : super(metadata, modifiers, name, parent, charOffset); |
| 35 | 35 |
| 36 /// Returns true if this class is the result of applying a mixin to its |
| 37 /// superclass. |
| 38 bool get isMixinApplication => mixedInType != null; |
| 39 |
| 40 T get mixedInType; |
| 41 |
| 36 List<ConstructorReferenceBuilder> get constructorReferences => null; | 42 List<ConstructorReferenceBuilder> get constructorReferences => null; |
| 37 | 43 |
| 38 Map<String, Builder> get constructors; | 44 Map<String, Builder> get constructors; |
| 39 | 45 |
| 40 Map<String, Builder> get membersInScope => members; | 46 Map<String, Builder> get membersInScope => members; |
| 41 | 47 |
| 42 int resolveConstructors(LibraryBuilder library) { | 48 int resolveConstructors(LibraryBuilder library) { |
| 43 if (constructorReferences == null) return 0; | 49 if (constructorReferences == null) return 0; |
| 44 Scope scope = computeInstanceScope(library.scope); | 50 Scope scope = computeInstanceScope(library.scope); |
| 45 for (ConstructorReferenceBuilder ref in constructorReferences) { | 51 for (ConstructorReferenceBuilder ref in constructorReferences) { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 return null; | 89 return null; |
| 84 } else if (isSetter && builder.isGetter) { | 90 } else if (isSetter && builder.isGetter) { |
| 85 return null; | 91 return null; |
| 86 } else { | 92 } else { |
| 87 return builder.isInstanceMember ? null : builder; | 93 return builder.isInstanceMember ? null : builder; |
| 88 } | 94 } |
| 89 } | 95 } |
| 90 | 96 |
| 91 Builder findConstructorOrFactory(String name); | 97 Builder findConstructorOrFactory(String name); |
| 92 } | 98 } |
| OLD | NEW |