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 analyzer_cli.starter; | 5 library analyzer_cli.starter; |
6 | 6 |
7 import 'package:analyzer/plugin/embedded_resolver_provider.dart'; | |
8 import 'package:analyzer/plugin/resolver_provider.dart'; | 7 import 'package:analyzer/plugin/resolver_provider.dart'; |
9 import 'package:analyzer_cli/src/driver.dart'; | 8 import 'package:analyzer_cli/src/driver.dart'; |
10 import 'package:plugin/plugin.dart'; | 9 import 'package:plugin/plugin.dart'; |
11 | 10 |
12 /** | 11 /** |
13 * An object that can be used to start a command-line analysis. This class | 12 * An object that can be used to start a command-line analysis. This class |
14 * exists so that clients can configure a command-line analyzer before starting | 13 * exists so that clients can configure a command-line analyzer before starting |
15 * it. | 14 * it. |
16 * | 15 * |
17 * Clients may not extend, implement or mix-in this class. | 16 * Clients may not extend, implement or mix-in this class. |
18 */ | 17 */ |
19 abstract class CommandLineStarter { | 18 abstract class CommandLineStarter { |
20 /** | 19 /** |
21 * Initialize a newly created starter to start up a command-line analysis. | 20 * Initialize a newly created starter to start up a command-line analysis. |
22 */ | 21 */ |
23 factory CommandLineStarter() = Driver; | 22 factory CommandLineStarter() = Driver; |
24 | 23 |
25 /** | 24 /** |
26 * Set the embedded resolver provider used to override the way embedded | |
27 * library URI's are resolved in some contexts. The provider should return | |
28 * `null` if the embedded library URI resolution scheme should be used | |
29 * instead. | |
30 */ | |
31 void set embeddedUriResolverProvider(EmbeddedResolverProvider provider); | |
32 | |
33 /** | |
34 * Set the package resolver provider used to override the way package URI's | 25 * Set the package resolver provider used to override the way package URI's |
35 * are resolved in some contexts. The provider should return `null` if the | 26 * are resolved in some contexts. The provider should return `null` if the |
36 * default package resolution scheme should be used instead. | 27 * default package resolution scheme should be used instead. |
37 */ | 28 */ |
38 void set packageResolverProvider(ResolverProvider provider); | 29 void set packageResolverProvider(ResolverProvider provider); |
39 | 30 |
40 /** | 31 /** |
41 * Set the [plugins] that are defined outside the analyzer_cli package. | 32 * Set the [plugins] that are defined outside the analyzer_cli package. |
42 */ | 33 */ |
43 void set userDefinedPlugins(List<Plugin> plugins); | 34 void set userDefinedPlugins(List<Plugin> plugins); |
44 | 35 |
45 /** | 36 /** |
46 * Use the given command-line [arguments] to start this analyzer. | 37 * Use the given command-line [arguments] to start this analyzer. |
47 */ | 38 */ |
48 void start(List<String> arguments); | 39 void start(List<String> arguments); |
49 } | 40 } |
OLD | NEW |