| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 library fasta.target_implementation; |
| 6 |
| 7 import 'builder/builder.dart' show |
| 8 ClassBuilder, |
| 9 LibraryBuilder; |
| 10 |
| 11 import 'target.dart' show |
| 12 Target; |
| 13 |
| 14 import 'ticker.dart' show |
| 15 Ticker; |
| 16 |
| 17 import 'translate_uri.dart' show |
| 18 TranslateUri; |
| 19 |
| 20 /// Provides the implementation details used by a loader for a target. |
| 21 abstract class TargetImplementation extends Target { |
| 22 final TranslateUri uriTranslator; |
| 23 |
| 24 TargetImplementation(Ticker ticker, this.uriTranslator) |
| 25 : super(ticker); |
| 26 |
| 27 /// Creates a [LibraryBuilder] corresponding to [uri], if one doesn't exist |
| 28 /// already. |
| 29 LibraryBuilder createLibraryBuilder(Uri uri); |
| 30 |
| 31 /// Add the classes extended or implemented directly by [cls] to [set]. |
| 32 void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set); |
| 33 |
| 34 /// Returns all classes that will be included in the resulting program. |
| 35 List<ClassBuilder> collectAllClasses(); |
| 36 |
| 37 /// The class [cls] is involved in a cyclic definition. This method should |
| 38 /// ensure that the cycle is broken, for example, by removing superclass and |
| 39 /// implemented interfaces. |
| 40 void breakCycle(ClassBuilder cls); |
| 41 |
| 42 Uri translateUri(Uri uri) => uriTranslator.translate(uri); |
| 43 } |
| OLD | NEW |