Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/pkg/di/lib/src/injector.dart

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 part of di;
2
3 abstract class Injector {
4 /**
5 * Name of the injector or null of none is given.
6 */
7 String get name;
8
9 /**
10 * The parent injector or null if root.
11 */
12 Injector get parent;
13
14 /**
15 * The root injector.
16 */
17 Injector get root;
18
19 /**
20 * List of all types which the injector can return
21 */
22 Set<Type> get types;
23
24 /**
25 * Indicates whether injector allows implicit injection -- resolving types
26 * that were not explicitly bound in the module(s).
27 */
28 bool get allowImplicitInjection;
29
30 /**
31 * Get an instance for given token ([Type]).
32 *
33 * If the injector already has an instance for this token, it returns this
34 * instance. Otherwise, injector resolves all its dependencies, instantiates
35 * new instance and returns this instance.
36 *
37 * If there is no binding for given token, injector asks parent injector.
38 *
39 * If there is no parent injector, an implicit binding is used. That is,
40 * the token ([Type]) is instantiated.
41 */
42 dynamic get(Type type, [Type annotation]);
43
44 /**
45 * Get an instance for given key ([Key]).
46 *
47 * If the injector already has an instance for this key, it returns this
48 * instance. Otherwise, injector resolves all its dependencies, instantiates
49 * new instance and returns this instance.
50 *
51 * If there is no binding for given key, injector asks parent injector.
52 */
53 dynamic getByKey(Key key);
54
55 /**
56 * Create a child injector.
57 *
58 * Child injector can override any bindings by adding additional modules.
59 *
60 * It also accepts a list of tokens that a new instance should be forced.
61 * That means, even if some parent injector already has an instance for this
62 * token, there will be a new instance created in the child injector.
63 */
64 Injector createChild(List<Module> modules,
65 {List forceNewInstances, String name});
66 }
OLDNEW
« no previous file with comments | « third_party/pkg/di/lib/src/errors.dart ('k') | third_party/pkg/di/lib/src/injector_delagate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698