blob: f2db56d9538beefe445da74c67a01f95313db4f2 [file] [log] [blame]
limpbizkitad520b62009-05-20 00:10:03 +00001<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
2<!-- Generated by the JDiff Javadoc doclet -->
3<!-- (http://www.jdiff.org) -->
4<!-- on Tue May 19 17:01:55 PDT 2009 -->
5
6<api
7 xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
8 xsi:noNamespaceSchemaLocation='api.xsd'
9 name="2.0"
10 jdversion="1.1.1">
11
12<!-- Command line arguments = -doclet jdiff.JDiff -docletpath /Applications/bin/jdiff-1.1.1/jdiff.jar:/Applications/bin/jdiff-1.1.1/xerces.jar -d /Users/jessewilson/Guice/guice-everything/api-diffs -classpath /usr/share/ant/lib/ant-launcher.jar:/usr/share/ant/lib/ant-jai.jar:/usr/share/ant/lib/ant-jmf.jar:/usr/share/ant/lib/ant-junit.jar:/usr/share/ant/lib/ant-nodeps.jar:/usr/share/ant/lib/ant-swing.jar:/usr/share/ant/lib/ant-testutil.jar:/usr/share/ant/lib/ant-trax.jar:/usr/share/ant/lib/ant.jar:/usr/share/ant/lib/junit.jar:/usr/share/ant/lib/xercesImpl.jar:/usr/share/ant/lib/xml-apis.jar -sourcepath /Users/jessewilson/Guice/google-guice/src:/Users/jessewilson/Guice/google-guice/extensions/jmx/src:/Users/jessewilson/Guice/google-guice/extensions/jndi/src:/Users/jessewilson/Guice/google-guice/extensions/assistedinject/src:/Users/jessewilson/Guice/google-guice/extensions/multibindings/src:/Users/jessewilson/Guice/google-guice/extensions/throwingproviders/src:/Users/jessewilson/Guice/google-guice/servlet/src:/Users/jessewilson/Guice/google-guice/spring/src:/Users/jessewilson/Guice/google-guice/struts2/plugin/src -apiname 2.0 -baseURI http://www.w3.org -apidir /Users/jessewilson/Guice/guice-everything/api-diffs -source 1.5 -->
13<package name="com.google.inject">
14 <!-- start class com.google.inject.AbstractModule -->
15 <class name="AbstractModule" extends="java.lang.Object"
16 abstract="true"
17 static="false" final="false" visibility="public"
18 deprecated="not deprecated">
19 <implements name="com.google.inject.Module"/>
20 <constructor name="AbstractModule"
21 static="false" final="false" visibility="public"
22 deprecated="not deprecated">
23 </constructor>
24 <method name="configure"
25 abstract="false" native="false" synchronized="true"
26 static="false" final="true" visibility="public"
27 deprecated="not deprecated">
28 <param name="builder" type="com.google.inject.Binder"/>
29 </method>
30 <method name="configure"
31 abstract="true" native="false" synchronized="false"
32 static="false" final="false" visibility="protected"
33 deprecated="not deprecated">
34 <doc>
35 <![CDATA[Configures a {@link Binder} via the exposed methods.]]>
36 </doc>
37 </method>
38 <method name="binder" return="com.google.inject.Binder"
39 abstract="false" native="false" synchronized="false"
40 static="false" final="false" visibility="protected"
41 deprecated="not deprecated">
42 <doc>
43 <![CDATA[Gets direct access to the underlying {@code Binder}.]]>
44 </doc>
45 </method>
46 <method name="bindScope"
47 abstract="false" native="false" synchronized="false"
48 static="false" final="false" visibility="protected"
49 deprecated="not deprecated">
50 <param name="scopeAnnotation" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
51 <param name="scope" type="com.google.inject.Scope"/>
52 <doc>
53 <![CDATA[@see Binder#bindScope(Class, Scope)]]>
54 </doc>
55 </method>
56 <method name="bind" return="com.google.inject.binder.LinkedBindingBuilder&lt;T&gt;"
57 abstract="false" native="false" synchronized="false"
58 static="false" final="false" visibility="protected"
59 deprecated="not deprecated">
60 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
61 <doc>
62 <![CDATA[@see Binder#bind(Key)]]>
63 </doc>
64 </method>
65 <method name="bind" return="com.google.inject.binder.AnnotatedBindingBuilder&lt;T&gt;"
66 abstract="false" native="false" synchronized="false"
67 static="false" final="false" visibility="protected"
68 deprecated="not deprecated">
69 <param name="typeLiteral" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
70 <doc>
71 <![CDATA[@see Binder#bind(TypeLiteral)]]>
72 </doc>
73 </method>
74 <method name="bind" return="com.google.inject.binder.AnnotatedBindingBuilder&lt;T&gt;"
75 abstract="false" native="false" synchronized="false"
76 static="false" final="false" visibility="protected"
77 deprecated="not deprecated">
78 <param name="clazz" type="java.lang.Class&lt;T&gt;"/>
79 <doc>
80 <![CDATA[@see Binder#bind(Class)]]>
81 </doc>
82 </method>
83 <method name="bindConstant" return="com.google.inject.binder.AnnotatedConstantBindingBuilder"
84 abstract="false" native="false" synchronized="false"
85 static="false" final="false" visibility="protected"
86 deprecated="not deprecated">
87 <doc>
88 <![CDATA[@see Binder#bindConstant()]]>
89 </doc>
90 </method>
91 <method name="install"
92 abstract="false" native="false" synchronized="false"
93 static="false" final="false" visibility="protected"
94 deprecated="not deprecated">
95 <param name="module" type="com.google.inject.Module"/>
96 <doc>
97 <![CDATA[@see Binder#install(Module)]]>
98 </doc>
99 </method>
100 <method name="addError"
101 abstract="false" native="false" synchronized="false"
102 static="false" final="false" visibility="protected"
103 deprecated="not deprecated">
104 <param name="message" type="java.lang.String"/>
105 <param name="arguments" type="java.lang.Object[]"/>
106 <doc>
107 <![CDATA[@see Binder#addError(String, Object[])]]>
108 </doc>
109 </method>
110 <method name="addError"
111 abstract="false" native="false" synchronized="false"
112 static="false" final="false" visibility="protected"
113 deprecated="not deprecated">
114 <param name="t" type="java.lang.Throwable"/>
115 <doc>
116 <![CDATA[@see Binder#addError(Throwable)]]>
117 </doc>
118 </method>
119 <method name="addError"
120 abstract="false" native="false" synchronized="false"
121 static="false" final="false" visibility="protected"
122 deprecated="not deprecated">
123 <param name="message" type="com.google.inject.spi.Message"/>
124 <doc>
125 <![CDATA[@see Binder#addError(Message)
126 @since 2.0]]>
127 </doc>
128 </method>
129 <method name="requestInjection"
130 abstract="false" native="false" synchronized="false"
131 static="false" final="false" visibility="protected"
132 deprecated="not deprecated">
133 <param name="instance" type="java.lang.Object"/>
134 <doc>
135 <![CDATA[@see Binder#requestInjection(Object)
136 @since 2.0]]>
137 </doc>
138 </method>
139 <method name="requestStaticInjection"
140 abstract="false" native="false" synchronized="false"
141 static="false" final="false" visibility="protected"
142 deprecated="not deprecated">
143 <param name="types" type="java.lang.Class[]"/>
144 <doc>
145 <![CDATA[@see Binder#requestStaticInjection(Class[])]]>
146 </doc>
147 </method>
148 <method name="bindInterceptor"
149 abstract="false" native="false" synchronized="false"
150 static="false" final="false" visibility="protected"
151 deprecated="not deprecated">
152 <param name="classMatcher" type="com.google.inject.matcher.Matcher&lt;? super java.lang.Class&lt;?&gt;&gt;"/>
153 <param name="methodMatcher" type="com.google.inject.matcher.Matcher&lt;? super java.lang.reflect.Method&gt;"/>
154 <param name="interceptors" type="org.aopalliance.intercept.MethodInterceptor[]"/>
155 <doc>
156 <![CDATA[@see Binder#bindInterceptor(com.google.inject.matcher.Matcher,
157 com.google.inject.matcher.Matcher,
158 org.aopalliance.intercept.MethodInterceptor[])]]>
159 </doc>
160 </method>
161 <method name="requireBinding"
162 abstract="false" native="false" synchronized="false"
163 static="false" final="false" visibility="protected"
164 deprecated="not deprecated">
165 <param name="key" type="com.google.inject.Key&lt;?&gt;"/>
166 <doc>
167 <![CDATA[Adds a dependency from this module to {@code key}. When the injector is
168 created, Guice will report an error if {@code key} cannot be injected.
169 Note that this requirement may be satisfied by implicit binding, such as
170 a public no-arguments constructor.
171
172 @since 2.0]]>
173 </doc>
174 </method>
175 <method name="requireBinding"
176 abstract="false" native="false" synchronized="false"
177 static="false" final="false" visibility="protected"
178 deprecated="not deprecated">
179 <param name="type" type="java.lang.Class&lt;?&gt;"/>
180 <doc>
181 <![CDATA[Adds a dependency from this module to {@code type}. When the injector is
182 created, Guice will report an error if {@code type} cannot be injected.
183 Note that this requirement may be satisfied by implicit binding, such as
184 a public no-arguments constructor.
185
186 @since 2.0]]>
187 </doc>
188 </method>
189 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
190 abstract="false" native="false" synchronized="false"
191 static="false" final="false" visibility="protected"
192 deprecated="not deprecated">
193 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
194 <doc>
195 <![CDATA[@see Binder#getProvider(Key)
196 @since 2.0]]>
197 </doc>
198 </method>
199 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
200 abstract="false" native="false" synchronized="false"
201 static="false" final="false" visibility="protected"
202 deprecated="not deprecated">
203 <param name="type" type="java.lang.Class&lt;T&gt;"/>
204 <doc>
205 <![CDATA[@see Binder#getProvider(Class)
206 @since 2.0]]>
207 </doc>
208 </method>
209 <method name="convertToTypes"
210 abstract="false" native="false" synchronized="false"
211 static="false" final="false" visibility="protected"
212 deprecated="not deprecated">
213 <param name="typeMatcher" type="com.google.inject.matcher.Matcher&lt;? super com.google.inject.TypeLiteral&lt;?&gt;&gt;"/>
214 <param name="converter" type="com.google.inject.spi.TypeConverter"/>
215 <doc>
216 <![CDATA[@see Binder#convertToTypes
217 @since 2.0]]>
218 </doc>
219 </method>
220 <method name="currentStage" return="com.google.inject.Stage"
221 abstract="false" native="false" synchronized="false"
222 static="false" final="false" visibility="protected"
223 deprecated="not deprecated">
224 <doc>
225 <![CDATA[@see Binder#currentStage()
226 @since 2.0]]>
227 </doc>
228 </method>
229 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
230 abstract="false" native="false" synchronized="false"
231 static="false" final="false" visibility="protected"
232 deprecated="not deprecated">
233 <param name="type" type="java.lang.Class&lt;T&gt;"/>
234 <doc>
235 <![CDATA[@see Binder#getMembersInjector(Class)
236 @since 2.0]]>
237 </doc>
238 </method>
239 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
240 abstract="false" native="false" synchronized="false"
241 static="false" final="false" visibility="protected"
242 deprecated="not deprecated">
243 <param name="type" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
244 <doc>
245 <![CDATA[@see Binder#getMembersInjector(TypeLiteral)
246 @since 2.0]]>
247 </doc>
248 </method>
249 <method name="bindListener"
250 abstract="false" native="false" synchronized="false"
251 static="false" final="false" visibility="protected"
252 deprecated="not deprecated">
253 <param name="typeMatcher" type="com.google.inject.matcher.Matcher&lt;? super com.google.inject.TypeLiteral&lt;?&gt;&gt;"/>
254 <param name="listener" type="com.google.inject.spi.TypeListener"/>
255 <doc>
256 <![CDATA[@see Binder#bindListener(com.google.inject.matcher.Matcher,
257 com.google.inject.spi.TypeListener)
258 @since 2.0]]>
259 </doc>
260 </method>
261 <doc>
262 <![CDATA[A support class for {@link Module}s which reduces repetition and results in
263 a more readable configuration. Simply extend this class, implement {@link
264 #configure()}, and call the inherited methods which mirror those found in
265 {@link Binder}. For example:
266
267 <pre>
268 public class MyModule extends AbstractModule {
269 protected void configure() {
270 bind(Service.class).to(ServiceImpl.class).in(Singleton.class);
271 bind(CreditCardPaymentService.class);
272 bind(PaymentService.class).to(CreditCardPaymentService.class);
273 bindConstant().annotatedWith(Names.named("port")).to(8080);
274 }
275 }
276 </pre>
277
278 @author crazybob@google.com (Bob Lee)]]>
279 </doc>
280 </class>
281 <!-- end class com.google.inject.AbstractModule -->
282 <!-- start interface com.google.inject.Binder -->
283 <interface name="Binder" abstract="true"
284 static="false" final="false" visibility="public"
285 deprecated="not deprecated">
286 <method name="bindInterceptor"
287 abstract="false" native="false" synchronized="false"
288 static="false" final="false" visibility="public"
289 deprecated="not deprecated">
290 <param name="classMatcher" type="com.google.inject.matcher.Matcher&lt;? super java.lang.Class&lt;?&gt;&gt;"/>
291 <param name="methodMatcher" type="com.google.inject.matcher.Matcher&lt;? super java.lang.reflect.Method&gt;"/>
292 <param name="interceptors" type="org.aopalliance.intercept.MethodInterceptor[]"/>
293 <doc>
294 <![CDATA[Binds method interceptor[s] to methods matched by class and method matchers. A method is
295 eligible for interception if:
296
297 <ul>
298 <li>Guice created the instance the method is on</li>
299 <li>Neither the enclosing type nor the method is final</li>
300 <li>And the method is package-private, protected, or public</li>
301 </ul>
302
303 @param classMatcher matches classes the interceptor should apply to. For
304 example: {@code only(Runnable.class)}.
305 @param methodMatcher matches methods the interceptor should apply to. For
306 example: {@code annotatedWith(Transactional.class)}.
307 @param interceptors to bind]]>
308 </doc>
309 </method>
310 <method name="bindScope"
311 abstract="false" native="false" synchronized="false"
312 static="false" final="false" visibility="public"
313 deprecated="not deprecated">
314 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
315 <param name="scope" type="com.google.inject.Scope"/>
316 <doc>
317 <![CDATA[Binds a scope to an annotation.]]>
318 </doc>
319 </method>
320 <method name="bind" return="com.google.inject.binder.LinkedBindingBuilder&lt;T&gt;"
321 abstract="false" native="false" synchronized="false"
322 static="false" final="false" visibility="public"
323 deprecated="not deprecated">
324 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
325 <doc>
326 <![CDATA[See the EDSL examples at {@link Binder}.]]>
327 </doc>
328 </method>
329 <method name="bind" return="com.google.inject.binder.AnnotatedBindingBuilder&lt;T&gt;"
330 abstract="false" native="false" synchronized="false"
331 static="false" final="false" visibility="public"
332 deprecated="not deprecated">
333 <param name="typeLiteral" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
334 <doc>
335 <![CDATA[See the EDSL examples at {@link Binder}.]]>
336 </doc>
337 </method>
338 <method name="bind" return="com.google.inject.binder.AnnotatedBindingBuilder&lt;T&gt;"
339 abstract="false" native="false" synchronized="false"
340 static="false" final="false" visibility="public"
341 deprecated="not deprecated">
342 <param name="type" type="java.lang.Class&lt;T&gt;"/>
343 <doc>
344 <![CDATA[See the EDSL examples at {@link Binder}.]]>
345 </doc>
346 </method>
347 <method name="bindConstant" return="com.google.inject.binder.AnnotatedConstantBindingBuilder"
348 abstract="false" native="false" synchronized="false"
349 static="false" final="false" visibility="public"
350 deprecated="not deprecated">
351 <doc>
352 <![CDATA[See the EDSL examples at {@link Binder}.]]>
353 </doc>
354 </method>
355 <method name="requestInjection"
356 abstract="false" native="false" synchronized="false"
357 static="false" final="false" visibility="public"
358 deprecated="not deprecated">
359 <param name="type" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
360 <param name="instance" type="T"/>
361 <doc>
362 <![CDATA[Upon successful creation, the {@link Injector} will inject instance fields
363 and methods of the given object.
364
365 @param type of instance
366 @param instance for which members will be injected
367 @since 2.0]]>
368 </doc>
369 </method>
370 <method name="requestInjection"
371 abstract="false" native="false" synchronized="false"
372 static="false" final="false" visibility="public"
373 deprecated="not deprecated">
374 <param name="instance" type="java.lang.Object"/>
375 <doc>
376 <![CDATA[Upon successful creation, the {@link Injector} will inject instance fields
377 and methods of the given object.
378
379 @param instance for which members will be injected
380 @since 2.0]]>
381 </doc>
382 </method>
383 <method name="requestStaticInjection"
384 abstract="false" native="false" synchronized="false"
385 static="false" final="false" visibility="public"
386 deprecated="not deprecated">
387 <param name="types" type="java.lang.Class[]"/>
388 <doc>
389 <![CDATA[Upon successful creation, the {@link Injector} will inject static fields
390 and methods in the given classes.
391
392 @param types for which static members will be injected]]>
393 </doc>
394 </method>
395 <method name="install"
396 abstract="false" native="false" synchronized="false"
397 static="false" final="false" visibility="public"
398 deprecated="not deprecated">
399 <param name="module" type="com.google.inject.Module"/>
400 <doc>
401 <![CDATA[Uses the given module to configure more bindings.]]>
402 </doc>
403 </method>
404 <method name="currentStage" return="com.google.inject.Stage"
405 abstract="false" native="false" synchronized="false"
406 static="false" final="false" visibility="public"
407 deprecated="not deprecated">
408 <doc>
409 <![CDATA[Gets the current stage.]]>
410 </doc>
411 </method>
412 <method name="addError"
413 abstract="false" native="false" synchronized="false"
414 static="false" final="false" visibility="public"
415 deprecated="not deprecated">
416 <param name="message" type="java.lang.String"/>
417 <param name="arguments" type="java.lang.Object[]"/>
418 <doc>
419 <![CDATA[Records an error message which will be presented to the user at a later
420 time. Unlike throwing an exception, this enable us to continue
421 configuring the Injector and discover more errors. Uses {@link
422 String#format(String, Object[])} to insert the arguments into the
423 message.]]>
424 </doc>
425 </method>
426 <method name="addError"
427 abstract="false" native="false" synchronized="false"
428 static="false" final="false" visibility="public"
429 deprecated="not deprecated">
430 <param name="t" type="java.lang.Throwable"/>
431 <doc>
432 <![CDATA[Records an exception, the full details of which will be logged, and the
433 message of which will be presented to the user at a later
434 time. If your Module calls something that you worry may fail, you should
435 catch the exception and pass it into this.]]>
436 </doc>
437 </method>
438 <method name="addError"
439 abstract="false" native="false" synchronized="false"
440 static="false" final="false" visibility="public"
441 deprecated="not deprecated">
442 <param name="message" type="com.google.inject.spi.Message"/>
443 <doc>
444 <![CDATA[Records an error message to be presented to the user at a later time.
445
446 @since 2.0]]>
447 </doc>
448 </method>
449 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
450 abstract="false" native="false" synchronized="false"
451 static="false" final="false" visibility="public"
452 deprecated="not deprecated">
453 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
454 <doc>
455 <![CDATA[Returns the provider used to obtain instances for the given injection key.
456 The returned will not be valid until the {@link Injector} has been
457 created. The provider will throw an {@code IllegalStateException} if you
458 try to use it beforehand.
459
460 @since 2.0]]>
461 </doc>
462 </method>
463 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
464 abstract="false" native="false" synchronized="false"
465 static="false" final="false" visibility="public"
466 deprecated="not deprecated">
467 <param name="type" type="java.lang.Class&lt;T&gt;"/>
468 <doc>
469 <![CDATA[Returns the provider used to obtain instances for the given injection type.
470 The returned provider will not be valid until the {@link Injector} has been
471 created. The provider will throw an {@code IllegalStateException} if you
472 try to use it beforehand.
473
474 @since 2.0]]>
475 </doc>
476 </method>
477 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
478 abstract="false" native="false" synchronized="false"
479 static="false" final="false" visibility="public"
480 deprecated="not deprecated">
481 <param name="typeLiteral" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
482 <doc>
483 <![CDATA[Returns the members injector used to inject dependencies into methods and fields on instances
484 of the given type {@code T}. The returned members injector will not be valid until the main
485 {@link Injector} has been created. The members injector will throw an {@code
486 IllegalStateException} if you try to use it beforehand.
487
488 @param typeLiteral type to get members injector for
489 @since 2.0]]>
490 </doc>
491 </method>
492 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
493 abstract="false" native="false" synchronized="false"
494 static="false" final="false" visibility="public"
495 deprecated="not deprecated">
496 <param name="type" type="java.lang.Class&lt;T&gt;"/>
497 <doc>
498 <![CDATA[Returns the members injector used to inject dependencies into methods and fields on instances
499 of the given type {@code T}. The returned members injector will not be valid until the main
500 {@link Injector} has been created. The members injector will throw an {@code
501 IllegalStateException} if you try to use it beforehand.
502
503 @param type type to get members injector for
504 @since 2.0]]>
505 </doc>
506 </method>
507 <method name="convertToTypes"
508 abstract="false" native="false" synchronized="false"
509 static="false" final="false" visibility="public"
510 deprecated="not deprecated">
511 <param name="typeMatcher" type="com.google.inject.matcher.Matcher&lt;? super com.google.inject.TypeLiteral&lt;?&gt;&gt;"/>
512 <param name="converter" type="com.google.inject.spi.TypeConverter"/>
513 <doc>
514 <![CDATA[Binds a type converter. The injector will use the given converter to
515 convert string constants to matching types as needed.
516
517 @param typeMatcher matches types the converter can handle
518 @param converter converts values
519 @since 2.0]]>
520 </doc>
521 </method>
522 <method name="bindListener"
523 abstract="false" native="false" synchronized="false"
524 static="false" final="false" visibility="public"
525 deprecated="not deprecated">
526 <param name="typeMatcher" type="com.google.inject.matcher.Matcher&lt;? super com.google.inject.TypeLiteral&lt;?&gt;&gt;"/>
527 <param name="listener" type="com.google.inject.spi.TypeListener"/>
528 <doc>
529 <![CDATA[Registers a listener for injectable types. Guice will notify the listener when it encounters
530 injectable types matched by the given type matcher.
531
532 @param typeMatcher that matches injectable types the listener should be notified of
533 @param listener for injectable types matched by typeMatcher
534 @since 2.0]]>
535 </doc>
536 </method>
537 <method name="withSource" return="com.google.inject.Binder"
538 abstract="false" native="false" synchronized="false"
539 static="false" final="false" visibility="public"
540 deprecated="not deprecated">
541 <param name="source" type="java.lang.Object"/>
542 <doc>
543 <![CDATA[Returns a binder that uses {@code source} as the reference location for
544 configuration errors. This is typically a {@link StackTraceElement}
545 for {@code .java} source but it could any binding source, such as the
546 path to a {@code .properties} file.
547
548 @param source any object representing the source location and has a
549 concise {@link Object#toString() toString()} value
550 @return a binder that shares its configuration with this binder
551 @since 2.0]]>
552 </doc>
553 </method>
554 <method name="skipSources" return="com.google.inject.Binder"
555 abstract="false" native="false" synchronized="false"
556 static="false" final="false" visibility="public"
557 deprecated="not deprecated">
558 <param name="classesToSkip" type="java.lang.Class[]"/>
559 <doc>
560 <![CDATA[Returns a binder that skips {@code classesToSkip} when identify the
561 calling code. The caller's {@link StackTraceElement} is used to locate
562 the source of configuration errors.
563
564 @param classesToSkip library classes that create bindings on behalf of
565 their clients.
566 @return a binder that shares its configuration with this binder.
567 @since 2.0]]>
568 </doc>
569 </method>
570 <method name="newPrivateBinder" return="com.google.inject.PrivateBinder"
571 abstract="false" native="false" synchronized="false"
572 static="false" final="false" visibility="public"
573 deprecated="not deprecated">
574 <doc>
575 <![CDATA[Creates a new private child environment for bindings and other configuration. The returned
576 binder can be used to add and configuration information in this environment. See {@link
577 PrivateModule} for details.
578
579 @return a binder that inherits configuration from this binder. Only exposed configuration on
580 the returned binder will be visible to this binder.
581 @since 2.0]]>
582 </doc>
583 </method>
584 <doc>
585 <![CDATA[Collects configuration information (primarily <i>bindings</i>) which will be
586 used to create an {@link Injector}. Guice provides this object to your
587 application's {@link Module} implementors so they may each contribute
588 their own bindings and other registrations.
589
590 <h3>The Guice Binding EDSL</h3>
591
592 Guice uses an <i>embedded domain-specific language</i>, or EDSL, to help you
593 create bindings simply and readably. This approach is great for overall
594 usability, but it does come with a small cost: <b>it is difficult to
595 learn how to use the Binding EDSL by reading
596 method-level javadocs</b>. Instead, you should consult the series of
597 examples below. To save space, these examples omit the opening
598 {@code binder}, just as you will if your module extends
599 {@link AbstractModule}.
600
601 <pre>
602 bind(ServiceImpl.class);</pre>
603
604 This statement does essentially nothing; it "binds the {@code ServiceImpl}
605 class to itself" and does not change Guice's default behavior. You may still
606 want to use this if you prefer your {@link Module} class to serve as an
607 explicit <i>manifest</i> for the services it provides. Also, in rare cases,
608 Guice may be unable to validate a binding at injector creation time unless it
609 is given explicitly.
610
611 <pre>
612 bind(Service.class).to(ServiceImpl.class);</pre>
613
614 Specifies that a request for a {@code Service} instance with no binding
615 annotations should be treated as if it were a request for a
616 {@code ServiceImpl} instance. This <i>overrides</i> the function of any
617 {@link ImplementedBy @ImplementedBy} or {@link ProvidedBy @ProvidedBy}
618 annotations found on {@code Service}, since Guice will have already
619 "moved on" to {@code ServiceImpl} before it reaches the point when it starts
620 looking for these annotations.
621
622 <pre>
623 bind(Service.class).toProvider(ServiceProvider.class);</pre>
624
625 In this example, {@code ServiceProvider} must extend or implement
626 {@code Provider<Service>}. This binding specifies that Guice should resolve
627 an unannotated injection request for {@code Service} by first resolving an
628 instance of {@code ServiceProvider} in the regular way, then calling
629 {@link Provider#get get()} on the resulting Provider instance to obtain the
630 {@code Service} instance.
631
632 <p>The {@link Provider} you use here does not have to be a "factory"; that
633 is, a provider which always <i>creates</i> each instance it provides.
634 However, this is generally a good practice to follow. You can then use
635 Guice's concept of {@link Scope scopes} to guide when creation should happen
636 -- "letting Guice work for you".
637
638 <pre>
639 bind(Service.class).annotatedWith(Red.class).to(ServiceImpl.class);</pre>
640
641 Like the previous example, but only applies to injection requests that use
642 the binding annotation {@code @Red}. If your module also includes bindings
643 for particular <i>values</i> of the {@code @Red} annotation (see below),
644 then this binding will serve as a "catch-all" for any values of {@code @Red}
645 that have no exact match in the bindings.
646
647 <pre>
648 bind(ServiceImpl.class).in(Singleton.class);
649 // or, alternatively
650 bind(ServiceImpl.class).in(Scopes.SINGLETON);</pre>
651
652 Either of these statements places the {@code ServiceImpl} class into
653 singleton scope. Guice will create only one instance of {@code ServiceImpl}
654 and will reuse it for all injection requests of this type. Note that it is
655 still possible to bind another instance of {@code ServiceImpl} if the second
656 binding is qualified by an annotation as in the previous example. Guice is
657 not overly concerned with <i>preventing</i> you from creating multiple
658 instances of your "singletons", only with <i>enabling</i> your application to
659 share only one instance if that's all you tell Guice you need.
660
661 <p><b>Note:</b> a scope specified in this way <i>overrides</i> any scope that
662 was specified with an annotation on the {@code ServiceImpl} class.
663
664 <p>Besides {@link Singleton}/{@link Scopes#SINGLETON}, there are
665 servlet-specific scopes available in
666 {@code com.google.inject.servlet.ServletScopes}, and your Modules can
667 contribute their own custom scopes for use here as well.
668
669 <pre>
670 bind(new TypeLiteral&lt;PaymentService&lt;CreditCard>>() {})
671 .to(CreditCardPaymentService.class);</pre>
672
673 This admittedly odd construct is the way to bind a parameterized type. It
674 tells Guice how to honor an injection request for an element of type
675 {@code PaymentService<CreditCard>}. The class
676 {@code CreditCardPaymentService} must implement the
677 {@code PaymentService<CreditCard>} interface. Guice cannot currently bind or
678 inject a generic type, such as {@code Set<E>}; all type parameters must be
679 fully specified.
680
681 <pre>
682 bind(Service.class).toInstance(new ServiceImpl());
683 // or, alternatively
684 bind(Service.class).toInstance(SomeLegacyRegistry.getService());</pre>
685
686 In this example, your module itself, <i>not Guice</i>, takes responsibility
687 for obtaining a {@code ServiceImpl} instance, then asks Guice to always use
688 this single instance to fulfill all {@code Service} injection requests. When
689 the {@link Injector} is created, it will automatically perform field
690 and method injection for this instance, but any injectable constructor on
691 {@code ServiceImpl} is simply ignored. Note that using this approach results
692 in "eager loading" behavior that you can't control.
693
694 <pre>
695 bindConstant().annotatedWith(ServerHost.class).to(args[0]);</pre>
696
697 Sets up a constant binding. Constant injections must always be annotated.
698 When a constant binding's value is a string, it is eligile for conversion to
699 all primitive types, to {@link Enum#valueOf(Class, String) all enums}, and to
700 {@link Class#forName class literals}. Conversions for other types can be
701 configured using {@link #convertToTypes(Matcher, TypeConverter)
702 convertToTypes()}.
703
704 <pre>
705 {@literal @}Color("red") Color red; // A member variable (field)
706 . . .
707 red = MyModule.class.getDeclaredField("red").getAnnotation(Color.class);
708 bind(Service.class).annotatedWith(red).to(RedService.class);</pre>
709
710 If your binding annotation has parameters you can apply different bindings to
711 different specific values of your annotation. Getting your hands on the
712 right instance of the annotation is a bit of a pain -- one approach, shown
713 above, is to apply a prototype annotation to a field in your module class, so
714 that you can read this annotation instance and give it to Guice.
715
716 <pre>
717 bind(Service.class)
718 .annotatedWith(Names.named("blue"))
719 .to(BlueService.class);</pre>
720
721 Differentiating by names is a common enough use case that we provided a
722 standard annotation, {@link com.google.inject.name.Named @Named}. Because of
723 Guice's library support, binding by name is quite easier than in the
724 arbitrary binding annotation case we just saw. However, remember that these
725 names will live in a single flat namespace with all the other names used in
726 your application.
727
728 <p>The above list of examples is far from exhaustive. If you can think of
729 how the concepts of one example might coexist with the concepts from another,
730 you can most likely weave the two together. If the two concepts make no
731 sense with each other, you most likely won't be able to do it. In a few
732 cases Guice will let something bogus slip by, and will then inform you of
733 the problems at runtime, as soon as you try to create your Injector.
734
735 <p>The other methods of Binder such as {@link #bindScope},
736 {@link #bindInterceptor}, {@link #install}, {@link #requestStaticInjection},
737 {@link #addError} and {@link #currentStage} are not part of the Binding EDSL;
738 you can learn how to use these in the usual way, from the method
739 documentation.
740
741 @author crazybob@google.com (Bob Lee)
742 @author jessewilson@google.com (Jesse Wilson)
743 @author kevinb@google.com (Kevin Bourrillion)]]>
744 </doc>
745 </interface>
746 <!-- end interface com.google.inject.Binder -->
747 <!-- start interface com.google.inject.Binding -->
748 <interface name="Binding" abstract="true"
749 static="false" final="false" visibility="public"
750 deprecated="not deprecated">
751 <implements name="com.google.inject.spi.Element"/>
752 <method name="getKey" return="com.google.inject.Key&lt;T&gt;"
753 abstract="false" native="false" synchronized="false"
754 static="false" final="false" visibility="public"
755 deprecated="not deprecated">
756 <doc>
757 <![CDATA[Returns the key for this binding.]]>
758 </doc>
759 </method>
760 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
761 abstract="false" native="false" synchronized="false"
762 static="false" final="false" visibility="public"
763 deprecated="not deprecated">
764 <doc>
765 <![CDATA[Returns the scoped provider guice uses to fulfill requests for this
766 binding.
767
768 @throws UnsupportedOperationException when invoked on a {@link Binding}
769 created via {@link com.google.inject.spi.Elements#getElements}. This
770 method is only supported on {@link Binding}s returned from an injector.]]>
771 </doc>
772 </method>
773 <method name="acceptTargetVisitor" return="V"
774 abstract="false" native="false" synchronized="false"
775 static="false" final="false" visibility="public"
776 deprecated="not deprecated">
777 <param name="visitor" type="com.google.inject.spi.BindingTargetVisitor&lt;? super T, V&gt;"/>
778 <doc>
779 <![CDATA[Accepts a target visitor. Invokes the visitor method specific to this binding's target.
780
781 @param visitor to call back on
782 @since 2.0]]>
783 </doc>
784 </method>
785 <method name="acceptScopingVisitor" return="V"
786 abstract="false" native="false" synchronized="false"
787 static="false" final="false" visibility="public"
788 deprecated="not deprecated">
789 <param name="visitor" type="com.google.inject.spi.BindingScopingVisitor&lt;V&gt;"/>
790 <doc>
791 <![CDATA[Accepts a scoping visitor. Invokes the visitor method specific to this binding's scoping.
792
793 @param visitor to call back on
794 @since 2.0]]>
795 </doc>
796 </method>
797 <doc>
798 <![CDATA[A mapping from a key (type and optional annotation) to the strategy for getting instances of the
799 type. This interface is part of the introspection API and is intended primarily for use by
800 tools.
801
802 <p>Bindings are created in several ways:
803 <ul>
804 <li>Explicitly in a module, via {@code bind()} and {@code bindConstant()}
805 statements:
806 <pre>
807 bind(Service.class).annotatedWith(Red.class).to(ServiceImpl.class);
808 bindConstant().annotatedWith(ServerHost.class).to(args[0]);</pre></li>
809 <li>Implicitly by the Injector by following a type's {@link ImplementedBy
810 pointer} {@link ProvidedBy annotations} or by using its {@link Inject annotated} or
811 default constructor.</li>
812 <li>By converting a bound instance to a different type.</li>
813 <li>For {@link Provider providers}, by delegating to the binding for the provided type.</li>
814 </ul>
815
816
817 <p>They exist on both modules and on injectors, and their behaviour is different for each:
818 <ul>
819 <li><strong>Module bindings</strong> are incomplete and cannot be used to provide instances.
820 This is because the applicable scopes and interceptors may not be known until an injector
821 is created. From a tool's perspective, module bindings are like the injector's source
822 code. They can be inspected or rewritten, but this analysis must be done statically.</li>
823 <li><strong>Injector bindings</strong> are complete and valid and can be used to provide
824 instances. From a tools' perspective, injector bindings are like reflection for an
825 injector. They have full runtime information, including the complete graph of injections
826 necessary to satisfy a binding.</li>
827 </ul>
828
829 @param <T> the bound type. The injected is always assignable to this type.
830
831 @author crazybob@google.com (Bob Lee)
832 @author jessewilson@google.com (Jesse Wilson)]]>
833 </doc>
834 </interface>
835 <!-- end interface com.google.inject.Binding -->
836 <!-- start class com.google.inject.BindingAnnotation -->
837 <class name="BindingAnnotation" abstract="true"
838 static="false" final="false" visibility="public"
839 deprecated="not deprecated">
840 <implements name="java.lang.annotation.Annotation"/>
841 <doc>
842 <![CDATA[Annotates annotations which are used for binding. Only one such annotation
843 may apply to a single injection point. You must also annotate binder
844 annotations with {@code @Retention(RUNTIME)}. For example:
845
846 <pre>
847 {@code @}Retention(RUNTIME)
848 {@code @}Target({ FIELD, PARAMETER, METHOD })
849 {@code @}BindingAnnotation
850 public {@code @}interface Transactional {}
851 </pre>
852
853 @author crazybob@google.com (Bob Lee)]]>
854 </doc>
855 </class>
856 <!-- end class com.google.inject.BindingAnnotation -->
857 <!-- start class com.google.inject.ConfigurationException -->
858 <class name="ConfigurationException" extends="java.lang.RuntimeException"
859 abstract="false"
860 static="false" final="true" visibility="public"
861 deprecated="not deprecated">
862 <constructor name="ConfigurationException" type="java.lang.Iterable&lt;com.google.inject.spi.Message&gt;"
863 static="false" final="false" visibility="public"
864 deprecated="not deprecated">
865 <doc>
866 <![CDATA[Creates a ConfigurationException containing {@code messages}.]]>
867 </doc>
868 </constructor>
869 <method name="withPartialValue" return="com.google.inject.ConfigurationException"
870 abstract="false" native="false" synchronized="false"
871 static="false" final="false" visibility="public"
872 deprecated="not deprecated">
873 <param name="partialValue" type="java.lang.Object"/>
874 <doc>
875 <![CDATA[Returns a copy of this configuration exception with the specified partial value.]]>
876 </doc>
877 </method>
878 <method name="getErrorMessages" return="java.util.Collection&lt;com.google.inject.spi.Message&gt;"
879 abstract="false" native="false" synchronized="false"
880 static="false" final="false" visibility="public"
881 deprecated="not deprecated">
882 <doc>
883 <![CDATA[Returns messages for the errors that caused this exception.]]>
884 </doc>
885 </method>
886 <method name="getPartialValue" return="E"
887 abstract="false" native="false" synchronized="false"
888 static="false" final="false" visibility="public"
889 deprecated="not deprecated">
890 <doc>
891 <![CDATA[Returns a value that was only partially computed due to this exception. The caller can use
892 this while collecting additional configuration problems.
893
894 @return the partial value, or {@code null} if none was set. The type of the partial value is
895 specified by the throwing method.]]>
896 </doc>
897 </method>
898 <method name="getMessage" return="java.lang.String"
899 abstract="false" native="false" synchronized="false"
900 static="false" final="false" visibility="public"
901 deprecated="not deprecated">
902 </method>
903 <doc>
904 <![CDATA[Thrown when a programming error such as a misplaced annotation, illegal binding, or unsupported
905 scope is found. Clients should catch this exception, log it, and stop execution.
906
907 @author jessewilson@google.com (Jesse Wilson)
908 @since 2.0]]>
909 </doc>
910 </class>
911 <!-- end class com.google.inject.ConfigurationException -->
912 <!-- start class com.google.inject.CreationException -->
913 <class name="CreationException" extends="java.lang.RuntimeException"
914 abstract="false"
915 static="false" final="false" visibility="public"
916 deprecated="not deprecated">
917 <constructor name="CreationException" type="java.util.Collection&lt;com.google.inject.spi.Message&gt;"
918 static="false" final="false" visibility="public"
919 deprecated="not deprecated">
920 <doc>
921 <![CDATA[Creates a CreationException containing {@code messages}.]]>
922 </doc>
923 </constructor>
924 <method name="getErrorMessages" return="java.util.Collection&lt;com.google.inject.spi.Message&gt;"
925 abstract="false" native="false" synchronized="false"
926 static="false" final="false" visibility="public"
927 deprecated="not deprecated">
928 <doc>
929 <![CDATA[Returns messages for the errors that caused this exception.]]>
930 </doc>
931 </method>
932 <method name="getMessage" return="java.lang.String"
933 abstract="false" native="false" synchronized="false"
934 static="false" final="false" visibility="public"
935 deprecated="not deprecated">
936 </method>
937 <doc>
938 <![CDATA[Thrown when errors occur while creating a {@link Injector}. Includes a list of encountered
939 errors. Clients should catch this exception, log it, and stop execution.
940
941 @author crazybob@google.com (Bob Lee)]]>
942 </doc>
943 </class>
944 <!-- end class com.google.inject.CreationException -->
945 <!-- start class com.google.inject.Exposed -->
946 <class name="Exposed" abstract="true"
947 static="false" final="false" visibility="public"
948 deprecated="not deprecated">
949 <implements name="java.lang.annotation.Annotation"/>
950 <doc>
951 <![CDATA[Acccompanies a {@literal @}{@link com.google.inject.Provides Provides} method annotation in a
952 private module to indicate that the provided binding is exposed.
953
954 @author jessewilson@google.com (Jesse Wilson)
955 @since 2.0]]>
956 </doc>
957 </class>
958 <!-- end class com.google.inject.Exposed -->
959 <!-- start class com.google.inject.Guice -->
960 <class name="Guice" extends="java.lang.Object"
961 abstract="false"
962 static="false" final="true" visibility="public"
963 deprecated="not deprecated">
964 <method name="createInjector" return="com.google.inject.Injector"
965 abstract="false" native="false" synchronized="false"
966 static="true" final="false" visibility="public"
967 deprecated="not deprecated">
968 <param name="modules" type="com.google.inject.Module[]"/>
969 <doc>
970 <![CDATA[Creates an injector for the given set of modules.
971
972 @throws CreationException if one or more errors occur during Injector
973 construction]]>
974 </doc>
975 </method>
976 <method name="createInjector" return="com.google.inject.Injector"
977 abstract="false" native="false" synchronized="false"
978 static="true" final="false" visibility="public"
979 deprecated="not deprecated">
980 <param name="modules" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
981 <doc>
982 <![CDATA[Creates an injector for the given set of modules.
983
984 @throws CreationException if one or more errors occur during Injector
985 creation]]>
986 </doc>
987 </method>
988 <method name="createInjector" return="com.google.inject.Injector"
989 abstract="false" native="false" synchronized="false"
990 static="true" final="false" visibility="public"
991 deprecated="not deprecated">
992 <param name="stage" type="com.google.inject.Stage"/>
993 <param name="modules" type="com.google.inject.Module[]"/>
994 <doc>
995 <![CDATA[Creates an injector for the given set of modules, in a given development
996 stage.
997
998 @throws CreationException if one or more errors occur during Injector
999 creation]]>
1000 </doc>
1001 </method>
1002 <method name="createInjector" return="com.google.inject.Injector"
1003 abstract="false" native="false" synchronized="false"
1004 static="true" final="false" visibility="public"
1005 deprecated="not deprecated">
1006 <param name="stage" type="com.google.inject.Stage"/>
1007 <param name="modules" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
1008 <doc>
1009 <![CDATA[Creates an injector for the given set of modules, in a given development
1010 stage.
1011
1012 @throws CreationException if one or more errors occur during Injector
1013 construction]]>
1014 </doc>
1015 </method>
1016 <doc>
1017 <![CDATA[The entry point to the Guice framework. Creates {@link Injector}s from
1018 {@link Module}s.
1019
1020 <p>Guice supports a model of development that draws clear boundaries between
1021 APIs, Implementations of these APIs, Modules which configure these
1022 implementations, and finally Applications which consist of a collection of
1023 Modules. It is the Application, which typically defines your {@code main()}
1024 method, that bootstraps the Guice Injector using the {@code Guice} class, as
1025 in this example:
1026 <pre>
1027 public class FooApplication {
1028 public static void main(String[] args) {
1029 Injector injector = Guice.createInjector(
1030 new ModuleA(),
1031 new ModuleB(),
1032 . . .
1033 new FooApplicationFlagsModule(args)
1034 );
1035
1036 // Now just bootstrap the application and you're done
1037 FooStarter starter = injector.getInstance(FooStarter.class);
1038 starter.runApplication();
1039 }
1040 }
1041 </pre>]]>
1042 </doc>
1043 </class>
1044 <!-- end class com.google.inject.Guice -->
1045 <!-- start class com.google.inject.ImplementedBy -->
1046 <class name="ImplementedBy" abstract="true"
1047 static="false" final="false" visibility="public"
1048 deprecated="not deprecated">
1049 <implements name="java.lang.annotation.Annotation"/>
1050 <doc>
1051 <![CDATA[A pointer to the default implementation of a type.
1052
1053 @author crazybob@google.com (Bob Lee)]]>
1054 </doc>
1055 </class>
1056 <!-- end class com.google.inject.ImplementedBy -->
1057 <!-- start class com.google.inject.Inject -->
1058 <class name="Inject" abstract="true"
1059 static="false" final="false" visibility="public"
1060 deprecated="not deprecated">
1061 <implements name="java.lang.annotation.Annotation"/>
1062 <doc>
1063 <![CDATA[Annotates members of your implementation class (constructors, methods
1064 and fields) into which the {@link Injector} should inject values.
1065 The Injector fulfills injection requests for:
1066
1067 <ul>
1068 <li>Every instance it constructs. The class being constructed must have
1069 exactly one of its constructors marked with {@code @Inject} or must have a
1070 constructor taking no parameters. The Injector then proceeds to perform
1071 method and field injections.
1072
1073 <li>Pre-constructed instances passed to {@link Injector#injectMembers},
1074 {@link com.google.inject.binder.LinkedBindingBuilder#toInstance(Object)} and
1075 {@link com.google.inject.binder.LinkedBindingBuilder#toProvider(Provider)}.
1076 In this case all constructors are, of course, ignored.
1077
1078 <li>Static fields and methods of classes which any {@link Module} has
1079 specifically requested static injection for, using
1080 {@link Binder#requestStaticInjection}.
1081 </ul>
1082
1083 In all cases, a member can be injected regardless of its Java access
1084 specifier (private, default, protected, public).
1085
1086 @author crazybob@google.com (Bob Lee)]]>
1087 </doc>
1088 </class>
1089 <!-- end class com.google.inject.Inject -->
1090 <!-- start interface com.google.inject.Injector -->
1091 <interface name="Injector" abstract="true"
1092 static="false" final="false" visibility="public"
1093 deprecated="not deprecated">
1094 <method name="injectMembers"
1095 abstract="false" native="false" synchronized="false"
1096 static="false" final="false" visibility="public"
1097 deprecated="not deprecated">
1098 <param name="instance" type="java.lang.Object"/>
1099 <doc>
1100 <![CDATA[Injects dependencies into the fields and methods of {@code instance}. Ignores the presence or
1101 absence of an injectable constructor.
1102
1103 <p>Whenever Guice creates an instance, it performs this injection automatically (after first
1104 performing constructor injection), so if you're able to let Guice create all your objects for
1105 you, you'll never need to use this method.
1106
1107 @param instance to inject members on
1108
1109 @see Binder#getMembersInjector(Class) for a preferred alternative that supports checks before
1110 run time]]>
1111 </doc>
1112 </method>
1113 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
1114 abstract="false" native="false" synchronized="false"
1115 static="false" final="false" visibility="public"
1116 deprecated="not deprecated">
1117 <param name="typeLiteral" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
1118 <doc>
1119 <![CDATA[Returns the members injector used to inject dependencies into methods and fields on instances
1120 of the given type {@code T}.
1121
1122 @param typeLiteral type to get members injector for
1123 @see Binder#getMembersInjector(TypeLiteral) for an alternative that offers up front error
1124 detection
1125 @since 2.0]]>
1126 </doc>
1127 </method>
1128 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
1129 abstract="false" native="false" synchronized="false"
1130 static="false" final="false" visibility="public"
1131 deprecated="not deprecated">
1132 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1133 <doc>
1134 <![CDATA[Returns the members injector used to inject dependencies into methods and fields on instances
1135 of the given type {@code T}. When feasible, use {@link Binder#getMembersInjector(TypeLiteral)}
1136 instead to get increased up front error detection.
1137
1138 @param type type to get members injector for
1139 @see Binder#getMembersInjector(Class) for an alternative that offers up front error
1140 detection
1141 @since 2.0]]>
1142 </doc>
1143 </method>
1144 <method name="getBindings" return="java.util.Map&lt;com.google.inject.Key&lt;?&gt;, com.google.inject.Binding&lt;?&gt;&gt;"
1145 abstract="false" native="false" synchronized="false"
1146 static="false" final="false" visibility="public"
1147 deprecated="not deprecated">
1148 <doc>
1149 <![CDATA[Returns all explicit bindings.
1150
1151 <p>The returned map does not include bindings inherited from a {@link #getParent() parent
1152 injector}, should one exist. The returned map is guaranteed to iterate (for example, with
1153 its {@link java.util.Map#entrySet()} iterator) in the order of insertion. In other words,
1154 the order in which bindings appear in user Modules.
1155
1156 <p>This method is part of the Guice SPI and is intended for use by tools and extensions.]]>
1157 </doc>
1158 </method>
1159 <method name="getBinding" return="com.google.inject.Binding&lt;T&gt;"
1160 abstract="false" native="false" synchronized="false"
1161 static="false" final="false" visibility="public"
1162 deprecated="not deprecated">
1163 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
1164 <doc>
1165 <![CDATA[Returns the binding for the given injection key. This will be an explicit bindings if the key
1166 was bound explicitly by a module, or an implicit binding otherwise. The implicit binding will
1167 be created if necessary.
1168
1169 <p>This method is part of the Guice SPI and is intended for use by tools and extensions.
1170
1171 @throws ConfigurationException if this injector cannot find or create the binding.]]>
1172 </doc>
1173 </method>
1174 <method name="getBinding" return="com.google.inject.Binding&lt;T&gt;"
1175 abstract="false" native="false" synchronized="false"
1176 static="false" final="false" visibility="public"
1177 deprecated="not deprecated">
1178 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1179 <doc>
1180 <![CDATA[Returns the binding for the given type. This will be an explicit bindings if the injection key
1181 was bound explicitly by a module, or an implicit binding otherwise. The implicit binding will
1182 be created if necessary.
1183
1184 <p>This method is part of the Guice SPI and is intended for use by tools and extensions.
1185
1186 @throws ConfigurationException if this injector cannot find or create the binding.
1187 @since 2.0]]>
1188 </doc>
1189 </method>
1190 <method name="findBindingsByType" return="java.util.List&lt;com.google.inject.Binding&lt;T&gt;&gt;"
1191 abstract="false" native="false" synchronized="false"
1192 static="false" final="false" visibility="public"
1193 deprecated="not deprecated">
1194 <param name="type" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
1195 <doc>
1196 <![CDATA[Returns all explicit bindings for {@code type}.
1197
1198 <p>This method is part of the Guice SPI and is intended for use by tools and extensions.]]>
1199 </doc>
1200 </method>
1201 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
1202 abstract="false" native="false" synchronized="false"
1203 static="false" final="false" visibility="public"
1204 deprecated="not deprecated">
1205 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
1206 <doc>
1207 <![CDATA[Returns the provider used to obtain instances for the given injection key. When feasible, avoid
1208 using this method, in favor of having Guice inject your dependencies ahead of time.
1209
1210 @throws ConfigurationException if this injector cannot find or create the provider.
1211 @see Binder#getProvider(Key) for an alternative that offers up front error detection]]>
1212 </doc>
1213 </method>
1214 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
1215 abstract="false" native="false" synchronized="false"
1216 static="false" final="false" visibility="public"
1217 deprecated="not deprecated">
1218 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1219 <doc>
1220 <![CDATA[Returns the provider used to obtain instances for the given type. When feasible, avoid
1221 using this method, in favor of having Guice inject your dependencies ahead of time.
1222
1223 @throws ConfigurationException if this injector cannot find or create the provider.
1224 @see Binder#getProvider(Class) for an alternative that offers up front error detection]]>
1225 </doc>
1226 </method>
1227 <method name="getInstance" return="T"
1228 abstract="false" native="false" synchronized="false"
1229 static="false" final="false" visibility="public"
1230 deprecated="not deprecated">
1231 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
1232 <doc>
1233 <![CDATA[Returns the appropriate instance for the given injection key; equivalent to {@code
1234 getProvider(key).get()}. When feasible, avoid using this method, in favor of having Guice
1235 inject your dependencies ahead of time.
1236
1237 @throws ConfigurationException if this injector cannot find or create the provider.
1238 @throws ProvisionException if there was a runtime failure while providing an instance.]]>
1239 </doc>
1240 </method>
1241 <method name="getInstance" return="T"
1242 abstract="false" native="false" synchronized="false"
1243 static="false" final="false" visibility="public"
1244 deprecated="not deprecated">
1245 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1246 <doc>
1247 <![CDATA[Returns the appropriate instance for the given injection type; equivalent to {@code
1248 getProvider(type).get()}. When feasible, avoid using this method, in favor of having Guice
1249 inject your dependencies ahead of time.
1250
1251 @throws ConfigurationException if this injector cannot find or create the provider.
1252 @throws ProvisionException if there was a runtime failure while providing an instance.]]>
1253 </doc>
1254 </method>
1255 <method name="getParent" return="com.google.inject.Injector"
1256 abstract="false" native="false" synchronized="false"
1257 static="false" final="false" visibility="public"
1258 deprecated="not deprecated">
1259 <doc>
1260 <![CDATA[Returns this injector's parent, or {@code null} if this is a top-level injector.
1261
1262 @since 2.0]]>
1263 </doc>
1264 </method>
1265 <method name="createChildInjector" return="com.google.inject.Injector"
1266 abstract="false" native="false" synchronized="false"
1267 static="false" final="false" visibility="public"
1268 deprecated="not deprecated">
1269 <param name="modules" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
1270 <doc>
1271 <![CDATA[Returns a new injector that inherits all state from this injector. All bindings, scopes,
1272 interceptors and type converters are inherited -- they are visible to the child injector.
1273 Elements of the child injector are not visible to its parent.
1274
1275 <p>Just-in-time bindings created for child injectors will be created in an ancestor injector
1276 whenever possible. This allows for scoped instances to be shared between injectors. Use
1277 explicit bindings to prevent bindings from being shared with the parent injector.
1278
1279 <p>No key may be bound by both an injector and one of its ancestors. This includes just-in-time
1280 bindings. The lone exception is the key for {@code Injector.class}, which is bound by each
1281 injector to itself.
1282
1283 @since 2.0]]>
1284 </doc>
1285 </method>
1286 <method name="createChildInjector" return="com.google.inject.Injector"
1287 abstract="false" native="false" synchronized="false"
1288 static="false" final="false" visibility="public"
1289 deprecated="not deprecated">
1290 <param name="modules" type="com.google.inject.Module[]"/>
1291 <doc>
1292 <![CDATA[Returns a new injector that inherits all state from this injector. All bindings, scopes,
1293 interceptors and type converters are inherited -- they are visible to the child injector.
1294 Elements of the child injector are not visible to its parent.
1295
1296 <p>Just-in-time bindings created for child injectors will be created in an ancestor injector
1297 whenever possible. This allows for scoped instances to be shared between injectors. Use
1298 explicit bindings to prevent bindings from being shared with the parent injector.
1299
1300 <p>No key may be bound by both an injector and one of its ancestors. This includes just-in-time
1301 bindings. The lone exception is the key for {@code Injector.class}, which is bound by each
1302 injector to itself.
1303
1304 @since 2.0]]>
1305 </doc>
1306 </method>
1307 <doc>
1308 <![CDATA[Builds the graphs of objects that make up your application. The injector tracks the dependencies
1309 for each type and uses bindings to inject them. This is the core of Guice, although you rarely
1310 interact with it directly. This "behind-the-scenes" operation is what distinguishes dependency
1311 injection from its cousin, the service locator pattern.
1312
1313 <p>Contains several default bindings:
1314
1315 <ul>
1316 <li>This {@link Injector} instance itself
1317 <li>A {@code Provider<T>} for each binding of type {@code T}
1318 <li>The {@link java.util.logging.Logger} for the class being injected
1319 <li>The {@link Stage} in which the Injector was created
1320 </ul>
1321
1322 Injectors are created using the facade class {@link Guice}.
1323
1324 <p>An injector can also {@link #injectMembers(Object) inject the dependencies} of
1325 already-constructed instances. This can be used to interoperate with objects created by other
1326 frameworks or services.
1327
1328 <p>Injectors can be {@link #createChildInjector(Iterable) hierarchical}. Child injectors inherit
1329 the configuration of their parent injectors, but the converse does not hold.
1330
1331 <p>The injector's {@link #getBindings() internal bindings} are available for introspection. This
1332 enables tools and extensions to operate on an injector reflectively.
1333
1334 @author crazybob@google.com (Bob Lee)
1335 @author jessewilson@google.com (Jesse Wilson)]]>
1336 </doc>
1337 </interface>
1338 <!-- end interface com.google.inject.Injector -->
1339 <!-- start class com.google.inject.Key -->
1340 <class name="Key" extends="java.lang.Object"
1341 abstract="false"
1342 static="false" final="false" visibility="public"
1343 deprecated="not deprecated">
1344 <constructor name="Key" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"
1345 static="false" final="false" visibility="protected"
1346 deprecated="not deprecated">
1347 <doc>
1348 <![CDATA[Constructs a new key. Derives the type from this class's type parameter.
1349
1350 <p>Clients create an empty anonymous subclass. Doing so embeds the type
1351 parameter in the anonymous class's type hierarchy so we can reconstitute it
1352 at runtime despite erasure.
1353
1354 <p>Example usage for a binding of type {@code Foo} annotated with
1355 {@code @Bar}:
1356
1357 <p>{@code new Key<Foo>(Bar.class) {}}.]]>
1358 </doc>
1359 </constructor>
1360 <constructor name="Key" type="java.lang.annotation.Annotation"
1361 static="false" final="false" visibility="protected"
1362 deprecated="not deprecated">
1363 <doc>
1364 <![CDATA[Constructs a new key. Derives the type from this class's type parameter.
1365
1366 <p>Clients create an empty anonymous subclass. Doing so embeds the type
1367 parameter in the anonymous class's type hierarchy so we can reconstitute it
1368 at runtime despite erasure.
1369
1370 <p>Example usage for a binding of type {@code Foo} annotated with
1371 {@code @Bar}:
1372
1373 <p>{@code new Key<Foo>(new Bar()) {}}.]]>
1374 </doc>
1375 </constructor>
1376 <constructor name="Key"
1377 static="false" final="false" visibility="protected"
1378 deprecated="not deprecated">
1379 <doc>
1380 <![CDATA[Constructs a new key. Derives the type from this class's type parameter.
1381
1382 <p>Clients create an empty anonymous subclass. Doing so embeds the type
1383 parameter in the anonymous class's type hierarchy so we can reconstitute it
1384 at runtime despite erasure.
1385
1386 <p>Example usage for a binding of type {@code Foo}:
1387
1388 <p>{@code new Key<Foo>() {}}.]]>
1389 </doc>
1390 </constructor>
1391 <method name="getTypeLiteral" return="com.google.inject.TypeLiteral&lt;T&gt;"
1392 abstract="false" native="false" synchronized="false"
1393 static="false" final="true" visibility="public"
1394 deprecated="not deprecated">
1395 <doc>
1396 <![CDATA[Gets the key type.]]>
1397 </doc>
1398 </method>
1399 <method name="getAnnotationType" return="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"
1400 abstract="false" native="false" synchronized="false"
1401 static="false" final="true" visibility="public"
1402 deprecated="not deprecated">
1403 <doc>
1404 <![CDATA[Gets the annotation type.]]>
1405 </doc>
1406 </method>
1407 <method name="getAnnotation" return="java.lang.annotation.Annotation"
1408 abstract="false" native="false" synchronized="false"
1409 static="false" final="true" visibility="public"
1410 deprecated="not deprecated">
1411 <doc>
1412 <![CDATA[Gets the annotation.]]>
1413 </doc>
1414 </method>
1415 <method name="equals" return="boolean"
1416 abstract="false" native="false" synchronized="false"
1417 static="false" final="true" visibility="public"
1418 deprecated="not deprecated">
1419 <param name="o" type="java.lang.Object"/>
1420 </method>
1421 <method name="hashCode" return="int"
1422 abstract="false" native="false" synchronized="false"
1423 static="false" final="true" visibility="public"
1424 deprecated="not deprecated">
1425 </method>
1426 <method name="toString" return="java.lang.String"
1427 abstract="false" native="false" synchronized="false"
1428 static="false" final="true" visibility="public"
1429 deprecated="not deprecated">
1430 </method>
1431 <method name="get" return="com.google.inject.Key&lt;T&gt;"
1432 abstract="false" native="false" synchronized="false"
1433 static="true" final="false" visibility="public"
1434 deprecated="not deprecated">
1435 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1436 <doc>
1437 <![CDATA[Gets a key for an injection type.]]>
1438 </doc>
1439 </method>
1440 <method name="get" return="com.google.inject.Key&lt;T&gt;"
1441 abstract="false" native="false" synchronized="false"
1442 static="true" final="false" visibility="public"
1443 deprecated="not deprecated">
1444 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1445 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
1446 <doc>
1447 <![CDATA[Gets a key for an injection type and an annotation type.]]>
1448 </doc>
1449 </method>
1450 <method name="get" return="com.google.inject.Key&lt;T&gt;"
1451 abstract="false" native="false" synchronized="false"
1452 static="true" final="false" visibility="public"
1453 deprecated="not deprecated">
1454 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1455 <param name="annotation" type="java.lang.annotation.Annotation"/>
1456 <doc>
1457 <![CDATA[Gets a key for an injection type and an annotation.]]>
1458 </doc>
1459 </method>
1460 <method name="get" return="com.google.inject.Key&lt;?&gt;"
1461 abstract="false" native="false" synchronized="false"
1462 static="true" final="false" visibility="public"
1463 deprecated="not deprecated">
1464 <param name="type" type="java.lang.reflect.Type"/>
1465 <doc>
1466 <![CDATA[Gets a key for an injection type.]]>
1467 </doc>
1468 </method>
1469 <method name="get" return="com.google.inject.Key&lt;?&gt;"
1470 abstract="false" native="false" synchronized="false"
1471 static="true" final="false" visibility="public"
1472 deprecated="not deprecated">
1473 <param name="type" type="java.lang.reflect.Type"/>
1474 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
1475 <doc>
1476 <![CDATA[Gets a key for an injection type and an annotation type.]]>
1477 </doc>
1478 </method>
1479 <method name="get" return="com.google.inject.Key&lt;?&gt;"
1480 abstract="false" native="false" synchronized="false"
1481 static="true" final="false" visibility="public"
1482 deprecated="not deprecated">
1483 <param name="type" type="java.lang.reflect.Type"/>
1484 <param name="annotation" type="java.lang.annotation.Annotation"/>
1485 <doc>
1486 <![CDATA[Gets a key for an injection type and an annotation.]]>
1487 </doc>
1488 </method>
1489 <method name="get" return="com.google.inject.Key&lt;T&gt;"
1490 abstract="false" native="false" synchronized="false"
1491 static="true" final="false" visibility="public"
1492 deprecated="not deprecated">
1493 <param name="typeLiteral" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
1494 <doc>
1495 <![CDATA[Gets a key for an injection type.]]>
1496 </doc>
1497 </method>
1498 <method name="get" return="com.google.inject.Key&lt;T&gt;"
1499 abstract="false" native="false" synchronized="false"
1500 static="true" final="false" visibility="public"
1501 deprecated="not deprecated">
1502 <param name="typeLiteral" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
1503 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
1504 <doc>
1505 <![CDATA[Gets a key for an injection type and an annotation type.]]>
1506 </doc>
1507 </method>
1508 <method name="get" return="com.google.inject.Key&lt;T&gt;"
1509 abstract="false" native="false" synchronized="false"
1510 static="true" final="false" visibility="public"
1511 deprecated="not deprecated">
1512 <param name="typeLiteral" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
1513 <param name="annotation" type="java.lang.annotation.Annotation"/>
1514 <doc>
1515 <![CDATA[Gets a key for an injection type and an annotation.]]>
1516 </doc>
1517 </method>
1518 <doc>
1519 <![CDATA[Binding key consisting of an injection type and an optional annotation.
1520 Matches the type and annotation at a point of injection.
1521
1522 <p>For example, {@code Key.get(Service.class, Transactional.class)} will
1523 match:
1524
1525 <pre>
1526 {@literal @}Inject
1527 public void setService({@literal @}Transactional Service service) {
1528 ...
1529 }
1530 </pre>
1531
1532 <p>{@code Key} supports generic types via subclassing just like {@link
1533 TypeLiteral}.
1534
1535 <p>Keys do not differentiate between primitive types (int, char, etc.) and
1536 their correpsonding wrapper types (Integer, Character, etc.). Primitive
1537 types will be replaced with their wrapper types when keys are created.
1538
1539 @author crazybob@google.com (Bob Lee)]]>
1540 </doc>
1541 </class>
1542 <!-- end class com.google.inject.Key -->
1543 <!-- start interface com.google.inject.MembersInjector -->
1544 <interface name="MembersInjector" abstract="true"
1545 static="false" final="false" visibility="public"
1546 deprecated="not deprecated">
1547 <method name="injectMembers"
1548 abstract="false" native="false" synchronized="false"
1549 static="false" final="false" visibility="public"
1550 deprecated="not deprecated">
1551 <param name="instance" type="T"/>
1552 <doc>
1553 <![CDATA[Injects dependencies into the fields and methods of {@code instance}. Ignores the presence or
1554 absence of an injectable constructor.
1555
1556 <p>Whenever Guice creates an instance, it performs this injection automatically (after first
1557 performing constructor injection), so if you're able to let Guice create all your objects for
1558 you, you'll never need to use this method.
1559
1560 @param instance to inject members on. May be {@code null}.]]>
1561 </doc>
1562 </method>
1563 <doc>
1564 <![CDATA[Injects dependencies into the fields and methods on instances of type {@code T}. Ignores the
1565 presence or absence of an injectable constructor.
1566
1567 @param <T> type to inject members of
1568
1569 @author crazybob@google.com (Bob Lee)
1570 @author jessewilson@google.com (Jesse Wilson)
1571 @since 2.0]]>
1572 </doc>
1573 </interface>
1574 <!-- end interface com.google.inject.MembersInjector -->
1575 <!-- start interface com.google.inject.Module -->
1576 <interface name="Module" abstract="true"
1577 static="false" final="false" visibility="public"
1578 deprecated="not deprecated">
1579 <method name="configure"
1580 abstract="false" native="false" synchronized="false"
1581 static="false" final="false" visibility="public"
1582 deprecated="not deprecated">
1583 <param name="binder" type="com.google.inject.Binder"/>
1584 <doc>
1585 <![CDATA[Contributes bindings and other configurations for this module to {@code binder}.
1586
1587 <p><strong>Do not invoke this method directly</strong> to install submodules. Instead use
1588 {@link Binder#install(Module)}, which ensures that {@link Provides provider methods} are
1589 discovered.]]>
1590 </doc>
1591 </method>
1592 <doc>
1593 <![CDATA[A module contributes configuration information, typically interface
1594 bindings, which will be used to create an {@link Injector}. A Guice-based
1595 application is ultimately composed of little more than a set of
1596 {@code Module}s and some bootstrapping code.
1597
1598 <p>Your Module classes can use a more streamlined syntax by extending
1599 {@link AbstractModule} rather than implementing this interface directly.
1600
1601 <p>In addition to the bindings configured via {@link #configure}, bindings
1602 will be created for all methods annotated with {@literal @}{@link Provides}.
1603 Use scope and binding annotations on these methods to configure the
1604 bindings.]]>
1605 </doc>
1606 </interface>
1607 <!-- end interface com.google.inject.Module -->
1608 <!-- start class com.google.inject.OutOfScopeException -->
1609 <class name="OutOfScopeException" extends="java.lang.RuntimeException"
1610 abstract="false"
1611 static="false" final="true" visibility="public"
1612 deprecated="not deprecated">
1613 <constructor name="OutOfScopeException" type="java.lang.String"
1614 static="false" final="false" visibility="public"
1615 deprecated="not deprecated">
1616 </constructor>
1617 <constructor name="OutOfScopeException" type="java.lang.String, java.lang.Throwable"
1618 static="false" final="false" visibility="public"
1619 deprecated="not deprecated">
1620 </constructor>
1621 <constructor name="OutOfScopeException" type="java.lang.Throwable"
1622 static="false" final="false" visibility="public"
1623 deprecated="not deprecated">
1624 </constructor>
1625 <doc>
1626 <![CDATA[Thrown from {@link Provider#get} when an attempt is made to access a scoped
1627 object while the scope in question is not currently active.
1628
1629 @author kevinb@google.com (Kevin Bourrillion)
1630 @since 2.0]]>
1631 </doc>
1632 </class>
1633 <!-- end class com.google.inject.OutOfScopeException -->
1634 <!-- start interface com.google.inject.PrivateBinder -->
1635 <interface name="PrivateBinder" abstract="true"
1636 static="false" final="false" visibility="public"
1637 deprecated="not deprecated">
1638 <implements name="com.google.inject.Binder"/>
1639 <method name="expose"
1640 abstract="false" native="false" synchronized="false"
1641 static="false" final="false" visibility="public"
1642 deprecated="not deprecated">
1643 <param name="key" type="com.google.inject.Key&lt;?&gt;"/>
1644 <doc>
1645 <![CDATA[Makes the binding for {@code key} available to the enclosing environment]]>
1646 </doc>
1647 </method>
1648 <method name="expose" return="com.google.inject.binder.AnnotatedElementBuilder"
1649 abstract="false" native="false" synchronized="false"
1650 static="false" final="false" visibility="public"
1651 deprecated="not deprecated">
1652 <param name="type" type="java.lang.Class&lt;?&gt;"/>
1653 <doc>
1654 <![CDATA[Makes a binding for {@code type} available to the enclosing environment. Use {@link
1655 com.google.inject.binder.AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
1656 binding annotation.]]>
1657 </doc>
1658 </method>
1659 <method name="expose" return="com.google.inject.binder.AnnotatedElementBuilder"
1660 abstract="false" native="false" synchronized="false"
1661 static="false" final="false" visibility="public"
1662 deprecated="not deprecated">
1663 <param name="type" type="com.google.inject.TypeLiteral&lt;?&gt;"/>
1664 <doc>
1665 <![CDATA[Makes a binding for {@code type} available to the enclosing environment. Use {@link
1666 AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
1667 binding annotation.]]>
1668 </doc>
1669 </method>
1670 <method name="withSource" return="com.google.inject.PrivateBinder"
1671 abstract="false" native="false" synchronized="false"
1672 static="false" final="false" visibility="public"
1673 deprecated="not deprecated">
1674 <param name="source" type="java.lang.Object"/>
1675 </method>
1676 <method name="skipSources" return="com.google.inject.PrivateBinder"
1677 abstract="false" native="false" synchronized="false"
1678 static="false" final="false" visibility="public"
1679 deprecated="not deprecated">
1680 <param name="classesToSkip" type="java.lang.Class[]"/>
1681 </method>
1682 <doc>
1683 <![CDATA[Returns a binder whose configuration information is hidden from its environment by default. See
1684 {@link com.google.inject.PrivateModule PrivateModule} for details.
1685
1686 @author jessewilson@google.com (Jesse Wilson)
1687 @since 2.0]]>
1688 </doc>
1689 </interface>
1690 <!-- end interface com.google.inject.PrivateBinder -->
1691 <!-- start class com.google.inject.PrivateModule -->
1692 <class name="PrivateModule" extends="java.lang.Object"
1693 abstract="true"
1694 static="false" final="false" visibility="public"
1695 deprecated="not deprecated">
1696 <implements name="com.google.inject.Module"/>
1697 <constructor name="PrivateModule"
1698 static="false" final="false" visibility="public"
1699 deprecated="not deprecated">
1700 </constructor>
1701 <method name="configure"
1702 abstract="false" native="false" synchronized="true"
1703 static="false" final="true" visibility="public"
1704 deprecated="not deprecated">
1705 <param name="binder" type="com.google.inject.Binder"/>
1706 </method>
1707 <method name="configure"
1708 abstract="true" native="false" synchronized="false"
1709 static="false" final="false" visibility="protected"
1710 deprecated="not deprecated">
1711 <doc>
1712 <![CDATA[Creates bindings and other configurations private to this module. Use {@link #expose(Class)
1713 expose()} to make the bindings in this module available externally.]]>
1714 </doc>
1715 </method>
1716 <method name="expose"
1717 abstract="false" native="false" synchronized="false"
1718 static="false" final="true" visibility="protected"
1719 deprecated="not deprecated">
1720 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
1721 <doc>
1722 <![CDATA[Makes the binding for {@code key} available to other modules and the injector.]]>
1723 </doc>
1724 </method>
1725 <method name="expose" return="com.google.inject.binder.AnnotatedElementBuilder"
1726 abstract="false" native="false" synchronized="false"
1727 static="false" final="true" visibility="protected"
1728 deprecated="not deprecated">
1729 <param name="type" type="java.lang.Class&lt;?&gt;"/>
1730 <doc>
1731 <![CDATA[Makes a binding for {@code type} available to other modules and the injector. Use {@link
1732 AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
1733 binding annotation.]]>
1734 </doc>
1735 </method>
1736 <method name="expose" return="com.google.inject.binder.AnnotatedElementBuilder"
1737 abstract="false" native="false" synchronized="false"
1738 static="false" final="true" visibility="protected"
1739 deprecated="not deprecated">
1740 <param name="type" type="com.google.inject.TypeLiteral&lt;?&gt;"/>
1741 <doc>
1742 <![CDATA[Makes a binding for {@code type} available to other modules and the injector. Use {@link
1743 AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
1744 binding annotation.]]>
1745 </doc>
1746 </method>
1747 <method name="binder" return="com.google.inject.PrivateBinder"
1748 abstract="false" native="false" synchronized="false"
1749 static="false" final="true" visibility="protected"
1750 deprecated="not deprecated">
1751 <doc>
1752 <![CDATA[Returns the current binder.]]>
1753 </doc>
1754 </method>
1755 <method name="bindScope"
1756 abstract="false" native="false" synchronized="false"
1757 static="false" final="true" visibility="protected"
1758 deprecated="not deprecated">
1759 <param name="scopeAnnotation" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
1760 <param name="scope" type="com.google.inject.Scope"/>
1761 <doc>
1762 <![CDATA[@see Binder#bindScope(Class, Scope)]]>
1763 </doc>
1764 </method>
1765 <method name="bind" return="com.google.inject.binder.LinkedBindingBuilder&lt;T&gt;"
1766 abstract="false" native="false" synchronized="false"
1767 static="false" final="true" visibility="protected"
1768 deprecated="not deprecated">
1769 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
1770 <doc>
1771 <![CDATA[@see Binder#bind(Key)]]>
1772 </doc>
1773 </method>
1774 <method name="bind" return="com.google.inject.binder.AnnotatedBindingBuilder&lt;T&gt;"
1775 abstract="false" native="false" synchronized="false"
1776 static="false" final="true" visibility="protected"
1777 deprecated="not deprecated">
1778 <param name="typeLiteral" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
1779 <doc>
1780 <![CDATA[@see Binder#bind(TypeLiteral)]]>
1781 </doc>
1782 </method>
1783 <method name="bind" return="com.google.inject.binder.AnnotatedBindingBuilder&lt;T&gt;"
1784 abstract="false" native="false" synchronized="false"
1785 static="false" final="true" visibility="protected"
1786 deprecated="not deprecated">
1787 <param name="clazz" type="java.lang.Class&lt;T&gt;"/>
1788 <doc>
1789 <![CDATA[@see Binder#bind(Class)]]>
1790 </doc>
1791 </method>
1792 <method name="bindConstant" return="com.google.inject.binder.AnnotatedConstantBindingBuilder"
1793 abstract="false" native="false" synchronized="false"
1794 static="false" final="true" visibility="protected"
1795 deprecated="not deprecated">
1796 <doc>
1797 <![CDATA[@see Binder#bindConstant()]]>
1798 </doc>
1799 </method>
1800 <method name="install"
1801 abstract="false" native="false" synchronized="false"
1802 static="false" final="true" visibility="protected"
1803 deprecated="not deprecated">
1804 <param name="module" type="com.google.inject.Module"/>
1805 <doc>
1806 <![CDATA[@see Binder#install(Module)]]>
1807 </doc>
1808 </method>
1809 <method name="addError"
1810 abstract="false" native="false" synchronized="false"
1811 static="false" final="true" visibility="protected"
1812 deprecated="not deprecated">
1813 <param name="message" type="java.lang.String"/>
1814 <param name="arguments" type="java.lang.Object[]"/>
1815 <doc>
1816 <![CDATA[@see Binder#addError(String, Object[])]]>
1817 </doc>
1818 </method>
1819 <method name="addError"
1820 abstract="false" native="false" synchronized="false"
1821 static="false" final="true" visibility="protected"
1822 deprecated="not deprecated">
1823 <param name="t" type="java.lang.Throwable"/>
1824 <doc>
1825 <![CDATA[@see Binder#addError(Throwable)]]>
1826 </doc>
1827 </method>
1828 <method name="addError"
1829 abstract="false" native="false" synchronized="false"
1830 static="false" final="true" visibility="protected"
1831 deprecated="not deprecated">
1832 <param name="message" type="com.google.inject.spi.Message"/>
1833 <doc>
1834 <![CDATA[@see Binder#addError(Message)]]>
1835 </doc>
1836 </method>
1837 <method name="requestInjection"
1838 abstract="false" native="false" synchronized="false"
1839 static="false" final="true" visibility="protected"
1840 deprecated="not deprecated">
1841 <param name="instance" type="java.lang.Object"/>
1842 <doc>
1843 <![CDATA[@see Binder#requestInjection(Object)]]>
1844 </doc>
1845 </method>
1846 <method name="requestStaticInjection"
1847 abstract="false" native="false" synchronized="false"
1848 static="false" final="true" visibility="protected"
1849 deprecated="not deprecated">
1850 <param name="types" type="java.lang.Class[]"/>
1851 <doc>
1852 <![CDATA[@see Binder#requestStaticInjection(Class[])]]>
1853 </doc>
1854 </method>
1855 <method name="bindInterceptor"
1856 abstract="false" native="false" synchronized="false"
1857 static="false" final="true" visibility="protected"
1858 deprecated="not deprecated">
1859 <param name="classMatcher" type="com.google.inject.matcher.Matcher&lt;? super java.lang.Class&lt;?&gt;&gt;"/>
1860 <param name="methodMatcher" type="com.google.inject.matcher.Matcher&lt;? super java.lang.reflect.Method&gt;"/>
1861 <param name="interceptors" type="org.aopalliance.intercept.MethodInterceptor[]"/>
1862 <doc>
1863 <![CDATA[@see Binder#bindInterceptor(com.google.inject.matcher.Matcher, com.google.inject.matcher.Matcher, org.aopalliance.intercept.MethodInterceptor[])]]>
1864 </doc>
1865 </method>
1866 <method name="requireBinding"
1867 abstract="false" native="false" synchronized="false"
1868 static="false" final="true" visibility="protected"
1869 deprecated="not deprecated">
1870 <param name="key" type="com.google.inject.Key&lt;?&gt;"/>
1871 <doc>
1872 <![CDATA[Instructs Guice to require a binding to the given key.]]>
1873 </doc>
1874 </method>
1875 <method name="requireBinding"
1876 abstract="false" native="false" synchronized="false"
1877 static="false" final="true" visibility="protected"
1878 deprecated="not deprecated">
1879 <param name="type" type="java.lang.Class&lt;?&gt;"/>
1880 <doc>
1881 <![CDATA[Instructs Guice to require a binding to the given type.]]>
1882 </doc>
1883 </method>
1884 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
1885 abstract="false" native="false" synchronized="false"
1886 static="false" final="true" visibility="protected"
1887 deprecated="not deprecated">
1888 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
1889 <doc>
1890 <![CDATA[@see Binder#getProvider(Key)]]>
1891 </doc>
1892 </method>
1893 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
1894 abstract="false" native="false" synchronized="false"
1895 static="false" final="true" visibility="protected"
1896 deprecated="not deprecated">
1897 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1898 <doc>
1899 <![CDATA[@see Binder#getProvider(Class)]]>
1900 </doc>
1901 </method>
1902 <method name="convertToTypes"
1903 abstract="false" native="false" synchronized="false"
1904 static="false" final="true" visibility="protected"
1905 deprecated="not deprecated">
1906 <param name="typeMatcher" type="com.google.inject.matcher.Matcher&lt;? super com.google.inject.TypeLiteral&lt;?&gt;&gt;"/>
1907 <param name="converter" type="com.google.inject.spi.TypeConverter"/>
1908 <doc>
1909 <![CDATA[@see Binder#convertToTypes(com.google.inject.matcher.Matcher, com.google.inject.spi.TypeConverter)]]>
1910 </doc>
1911 </method>
1912 <method name="currentStage" return="com.google.inject.Stage"
1913 abstract="false" native="false" synchronized="false"
1914 static="false" final="true" visibility="protected"
1915 deprecated="not deprecated">
1916 <doc>
1917 <![CDATA[@see Binder#currentStage()]]>
1918 </doc>
1919 </method>
1920 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
1921 abstract="false" native="false" synchronized="false"
1922 static="false" final="false" visibility="protected"
1923 deprecated="not deprecated">
1924 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1925 <doc>
1926 <![CDATA[@see Binder#getMembersInjector(Class)]]>
1927 </doc>
1928 </method>
1929 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
1930 abstract="false" native="false" synchronized="false"
1931 static="false" final="false" visibility="protected"
1932 deprecated="not deprecated">
1933 <param name="type" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
1934 <doc>
1935 <![CDATA[@see Binder#getMembersInjector(TypeLiteral)]]>
1936 </doc>
1937 </method>
1938 <method name="bindListener"
1939 abstract="false" native="false" synchronized="false"
1940 static="false" final="false" visibility="protected"
1941 deprecated="not deprecated">
1942 <param name="typeMatcher" type="com.google.inject.matcher.Matcher&lt;? super com.google.inject.TypeLiteral&lt;?&gt;&gt;"/>
1943 <param name="listener" type="com.google.inject.spi.TypeListener"/>
1944 <doc>
1945 <![CDATA[@see Binder#bindListener(com.google.inject.matcher.Matcher, com.google.inject.spi.TypeListener)]]>
1946 </doc>
1947 </method>
1948 <doc>
1949 <![CDATA[A module whose configuration information is hidden from its environment by default. Only bindings
1950 that are explicitly exposed will be available to other modules and to the users of the injector.
1951 This module may expose the bindings it creates and the bindings of the modules it installs.
1952
1953 <p>A private module can be nested within a regular module or within another private module using
1954 {@link Binder#install install()}. Its bindings live in a new environment that inherits bindings,
1955 type converters, scopes, and interceptors from the surrounding ("parent") environment. When you
1956 nest multiple private modules, the result is a tree of environments where the injector's
1957 environment is the root.
1958
1959 <p>Guice EDSL bindings can be exposed with {@link #expose(Class) expose()}. {@literal @}{@link
1960 com.google.inject.Provides Provides} bindings can be exposed with the {@literal @}{@link
1961 Exposed} annotation:
1962
1963 <pre>
1964 public class FooBarBazModule extends PrivateModule {
1965 protected void configure() {
1966 bind(Foo.class).to(RealFoo.class);
1967 expose(Foo.class);
1968
1969 install(new TransactionalBarModule());
1970 expose(Bar.class).annotatedWith(Transactional.class);
1971
1972 bind(SomeImplementationDetail.class);
1973 install(new MoreImplementationDetailsModule());
1974 }
1975
1976 {@literal @}Provides {@literal @}Exposed
1977 public Baz provideBaz() {
1978 return new SuperBaz();
1979 }
1980 }
1981 </pre>
1982
1983 <p>Private modules are implemented using {@link Injector#createChildInjector(Module[]) parent
1984 injectors}. When it can satisfy their dependencies, just-in-time bindings will be created in the
1985 root environment. Such bindings are shared among all environments in the tree.
1986
1987 <p>The scope of a binding is constrained to its environment. A singleton bound in a private
1988 module will be unique to its environment. But a binding for the same type in a different private
1989 module will yield a different instance.
1990
1991 <p>A shared binding that injects the {@code Injector} gets the root injector, which only has
1992 access to bindings in the root environment. An explicit binding that injects the {@code Injector}
1993 gets access to all bindings in the child environment.
1994
1995 <p>To promote a just-in-time binding to an explicit binding, bind it:
1996 <pre>
1997 bind(FooImpl.class);
1998 </pre>
1999
2000 @author jessewilson@google.com (Jesse Wilson)
2001 @since 2.0]]>
2002 </doc>
2003 </class>
2004 <!-- end class com.google.inject.PrivateModule -->
2005 <!-- start class com.google.inject.ProvidedBy -->
2006 <class name="ProvidedBy" abstract="true"
2007 static="false" final="false" visibility="public"
2008 deprecated="not deprecated">
2009 <implements name="java.lang.annotation.Annotation"/>
2010 <doc>
2011 <![CDATA[A pointer to the default provider type for a type.
2012
2013 @author crazybob@google.com (Bob Lee)]]>
2014 </doc>
2015 </class>
2016 <!-- end class com.google.inject.ProvidedBy -->
2017 <!-- start interface com.google.inject.Provider -->
2018 <interface name="Provider" abstract="true"
2019 static="false" final="false" visibility="public"
2020 deprecated="not deprecated">
2021 <method name="get" return="T"
2022 abstract="false" native="false" synchronized="false"
2023 static="false" final="false" visibility="public"
2024 deprecated="not deprecated">
2025 <doc>
2026 <![CDATA[Provides an instance of {@code T}. Must never return {@code null}.
2027
2028 @throws OutOfScopeException when an attempt is made to access a scoped object while the scope
2029 in question is not currently active
2030 @throws ProvisionException if an instance cannot be provided. Such exceptions include messages
2031 and throwables to describe why provision failed.]]>
2032 </doc>
2033 </method>
2034 <doc>
2035 <![CDATA[An object capable of providing instances of type {@code T}. Providers are used in numerous ways
2036 by Guice:
2037
2038 <ul>
2039 <li>When the default means for obtaining instances (an injectable or parameterless constructor)
2040 is insufficient for a particular binding, the module can specify a custom {@code Provider}
2041 instead, to control exactly how Guice creates or obtains instances for the binding.
2042
2043 <li>An implementation class may always choose to have a {@code Provider<T>} instance injected,
2044 rather than having a {@code T} injected directly. This may give you access to multiple
2045 instances, instances you wish to safely mutate and discard, instances which are out of scope
2046 (e.g. using a {@code @RequestScoped} object from within a {@code @SessionScoped} object), or
2047 instances that will be initialized lazily.
2048
2049 <li>A custom {@link Scope} is implemented as a decorator of {@code Provider<T>}, which decides
2050 when to delegate to the backing provider and when to provide the instance some other way.
2051
2052 <li>The {@link Injector} offers access to the {@code Provider<T>} it uses to fulfill requests
2053 for a given key, via the {@link Injector#getProvider} methods.
2054 </ul>
2055
2056 @param <T> the type of object this provides
2057
2058 @author crazybob@google.com (Bob Lee)]]>
2059 </doc>
2060 </interface>
2061 <!-- end interface com.google.inject.Provider -->
2062 <!-- start class com.google.inject.Provides -->
2063 <class name="Provides" abstract="true"
2064 static="false" final="false" visibility="public"
2065 deprecated="not deprecated">
2066 <implements name="java.lang.annotation.Annotation"/>
2067 <doc>
2068 <![CDATA[Annotates methods of a {@link Module} to create a provider method binding. The method's return
2069 type is bound to it's returned value. Guice will pass dependencies to the method as parameters.
2070
2071 @author crazybob@google.com (Bob Lee)
2072 @since 2.0]]>
2073 </doc>
2074 </class>
2075 <!-- end class com.google.inject.Provides -->
2076 <!-- start class com.google.inject.ProvisionException -->
2077 <class name="ProvisionException" extends="java.lang.RuntimeException"
2078 abstract="false"
2079 static="false" final="true" visibility="public"
2080 deprecated="not deprecated">
2081 <constructor name="ProvisionException" type="java.lang.Iterable&lt;com.google.inject.spi.Message&gt;"
2082 static="false" final="false" visibility="public"
2083 deprecated="not deprecated">
2084 <doc>
2085 <![CDATA[Creates a ConfigurationException containing {@code messages}.]]>
2086 </doc>
2087 </constructor>
2088 <constructor name="ProvisionException" type="java.lang.String, java.lang.Throwable"
2089 static="false" final="false" visibility="public"
2090 deprecated="not deprecated">
2091 </constructor>
2092 <constructor name="ProvisionException" type="java.lang.String"
2093 static="false" final="false" visibility="public"
2094 deprecated="not deprecated">
2095 </constructor>
2096 <method name="getErrorMessages" return="java.util.Collection&lt;com.google.inject.spi.Message&gt;"
2097 abstract="false" native="false" synchronized="false"
2098 static="false" final="false" visibility="public"
2099 deprecated="not deprecated">
2100 <doc>
2101 <![CDATA[Returns messages for the errors that caused this exception.]]>
2102 </doc>
2103 </method>
2104 <method name="getMessage" return="java.lang.String"
2105 abstract="false" native="false" synchronized="false"
2106 static="false" final="false" visibility="public"
2107 deprecated="not deprecated">
2108 </method>
2109 <doc>
2110 <![CDATA[Indicates that there was a runtime failure while providing an instance.
2111
2112 @author kevinb@google.com (Kevin Bourrillion)
2113 @author jessewilson@google.com (Jesse Wilson)
2114 @since 2.0]]>
2115 </doc>
2116 </class>
2117 <!-- end class com.google.inject.ProvisionException -->
2118 <!-- start interface com.google.inject.Scope -->
2119 <interface name="Scope" abstract="true"
2120 static="false" final="false" visibility="public"
2121 deprecated="not deprecated">
2122 <method name="scope" return="com.google.inject.Provider&lt;T&gt;"
2123 abstract="false" native="false" synchronized="false"
2124 static="false" final="false" visibility="public"
2125 deprecated="not deprecated">
2126 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
2127 <param name="unscoped" type="com.google.inject.Provider&lt;T&gt;"/>
2128 <doc>
2129 <![CDATA[Scopes a provider. The returned provider returns objects from this scope.
2130 If an object does not exist in this scope, the provider can use the given
2131 unscoped provider to retrieve one.
2132
2133 <p>Scope implementations are strongly encouraged to override
2134 {@link Object#toString} in the returned provider and include the backing
2135 provider's {@code toString()} output.
2136
2137 @param key binding key
2138 @param unscoped locates an instance when one doesn't already exist in this
2139 scope.
2140 @return a new provider which only delegates to the given unscoped provider
2141 when an instance of the requested object doesn't already exist in this
2142 scope]]>
2143 </doc>
2144 </method>
2145 <method name="toString" return="java.lang.String"
2146 abstract="false" native="false" synchronized="false"
2147 static="false" final="false" visibility="public"
2148 deprecated="not deprecated">
2149 <doc>
2150 <![CDATA[A short but useful description of this scope. For comparison, the standard
2151 scopes that ship with guice use the descriptions
2152 {@code "Scopes.SINGLETON"}, {@code "ServletScopes.SESSION"} and
2153 {@code "ServletScopes.REQUEST"}.]]>
2154 </doc>
2155 </method>
2156 <doc>
2157 <![CDATA[A scope is a level of visibility that instances provided by Guice may have.
2158 By default, an instance created by the {@link Injector} has <i>no scope</i>,
2159 meaning it has no state from the framework's perspective -- the
2160 {@code Injector} creates it, injects it once into the class that required it,
2161 and then immediately forgets it. Associating a scope with a particular
2162 binding allows the created instance to be "remembered" and possibly used
2163 again for other injections.
2164
2165 <p>An example of a scope is {@link Scopes#SINGLETON}.
2166
2167 @author crazybob@google.com (Bob Lee)]]>
2168 </doc>
2169 </interface>
2170 <!-- end interface com.google.inject.Scope -->
2171 <!-- start class com.google.inject.ScopeAnnotation -->
2172 <class name="ScopeAnnotation" abstract="true"
2173 static="false" final="false" visibility="public"
2174 deprecated="not deprecated">
2175 <implements name="java.lang.annotation.Annotation"/>
2176 <doc>
2177 <![CDATA[Annotates annotations which are used for scoping. Only one such annotation
2178 may apply to a single implementation class. You must also annotate scope
2179 annotations with {@code @Retention(RUNTIME)}. For example:
2180
2181 <pre>
2182 {@code @}Retention(RUNTIME)
2183 {@code @}Target(TYPE)
2184 {@code @}ScopeAnnotation
2185 public {@code @}interface SessionScoped {}
2186 </pre>
2187
2188 @author crazybob@google.com (Bob Lee)]]>
2189 </doc>
2190 </class>
2191 <!-- end class com.google.inject.ScopeAnnotation -->
2192 <!-- start class com.google.inject.Scopes -->
2193 <class name="Scopes" extends="java.lang.Object"
2194 abstract="false"
2195 static="false" final="false" visibility="public"
2196 deprecated="not deprecated">
2197 <field name="SINGLETON" type="com.google.inject.Scope"
2198 transient="false" volatile="false"
2199 static="true" final="true" visibility="public"
2200 deprecated="not deprecated">
2201 <doc>
2202 <![CDATA[One instance per {@link Injector}. Also see {@code @}{@link Singleton}.]]>
2203 </doc>
2204 </field>
2205 <field name="NO_SCOPE" type="com.google.inject.Scope"
2206 transient="false" volatile="false"
2207 static="true" final="true" visibility="public"
2208 deprecated="not deprecated">
2209 <doc>
2210 <![CDATA[No scope; the same as not applying any scope at all. Each time the
2211 Injector obtains an instance of an object with "no scope", it injects this
2212 instance then immediately forgets it. When the next request for the same
2213 binding arrives it will need to obtain the instance over again.
2214
2215 <p>This exists only in case a class has been annotated with a scope
2216 annotation such as {@link Singleton @Singleton}, and you need to override
2217 this to "no scope" in your binding.
2218
2219 @since 2.0]]>
2220 </doc>
2221 </field>
2222 <doc>
2223 <![CDATA[Built-in scope implementations.
2224
2225 @author crazybob@google.com (Bob Lee)]]>
2226 </doc>
2227 </class>
2228 <!-- end class com.google.inject.Scopes -->
2229 <!-- start class com.google.inject.Singleton -->
2230 <class name="Singleton" abstract="true"
2231 static="false" final="false" visibility="public"
2232 deprecated="not deprecated">
2233 <implements name="java.lang.annotation.Annotation"/>
2234 <doc>
2235 <![CDATA[Apply this to implementation classes when you want only one instance
2236 (per {@link Injector}) to be reused for all injections for that binding.
2237
2238 @author crazybob@google.com (Bob Lee)]]>
2239 </doc>
2240 </class>
2241 <!-- end class com.google.inject.Singleton -->
2242 <!-- start class com.google.inject.Stage -->
2243 <class name="Stage" extends="java.lang.Enum&lt;com.google.inject.Stage&gt;"
2244 abstract="false"
2245 static="false" final="true" visibility="public"
2246 deprecated="not deprecated">
2247 <method name="values" return="com.google.inject.Stage[]"
2248 abstract="false" native="false" synchronized="false"
2249 static="true" final="false" visibility="public"
2250 deprecated="not deprecated">
2251 </method>
2252 <method name="valueOf" return="com.google.inject.Stage"
2253 abstract="false" native="false" synchronized="false"
2254 static="true" final="false" visibility="public"
2255 deprecated="not deprecated">
2256 <param name="name" type="java.lang.String"/>
2257 </method>
2258 <doc>
2259 <![CDATA[The stage we're running in.
2260
2261 @author crazybob@google.com (Bob Lee)]]>
2262 </doc>
2263 </class>
2264 <!-- end class com.google.inject.Stage -->
2265 <!-- start class com.google.inject.TypeLiteral -->
2266 <class name="TypeLiteral" extends="java.lang.Object"
2267 abstract="false"
2268 static="false" final="false" visibility="public"
2269 deprecated="not deprecated">
2270 <constructor name="TypeLiteral"
2271 static="false" final="false" visibility="protected"
2272 deprecated="not deprecated">
2273 <doc>
2274 <![CDATA[Constructs a new type literal. Derives represented class from type
2275 parameter.
2276
2277 <p>Clients create an empty anonymous subclass. Doing so embeds the type
2278 parameter in the anonymous class's type hierarchy so we can reconstitute it
2279 at runtime despite erasure.]]>
2280 </doc>
2281 </constructor>
2282 <method name="getRawType" return="java.lang.Class&lt;? super T&gt;"
2283 abstract="false" native="false" synchronized="false"
2284 static="false" final="true" visibility="public"
2285 deprecated="not deprecated">
2286 <doc>
2287 <![CDATA[Returns the raw (non-generic) type for this type.
2288
2289 @since 2.0]]>
2290 </doc>
2291 </method>
2292 <method name="getType" return="java.lang.reflect.Type"
2293 abstract="false" native="false" synchronized="false"
2294 static="false" final="true" visibility="public"
2295 deprecated="not deprecated">
2296 <doc>
2297 <![CDATA[Gets underlying {@code Type} instance.]]>
2298 </doc>
2299 </method>
2300 <method name="hashCode" return="int"
2301 abstract="false" native="false" synchronized="false"
2302 static="false" final="true" visibility="public"
2303 deprecated="not deprecated">
2304 </method>
2305 <method name="equals" return="boolean"
2306 abstract="false" native="false" synchronized="false"
2307 static="false" final="true" visibility="public"
2308 deprecated="not deprecated">
2309 <param name="o" type="java.lang.Object"/>
2310 </method>
2311 <method name="toString" return="java.lang.String"
2312 abstract="false" native="false" synchronized="false"
2313 static="false" final="true" visibility="public"
2314 deprecated="not deprecated">
2315 </method>
2316 <method name="get" return="com.google.inject.TypeLiteral&lt;?&gt;"
2317 abstract="false" native="false" synchronized="false"
2318 static="true" final="false" visibility="public"
2319 deprecated="not deprecated">
2320 <param name="type" type="java.lang.reflect.Type"/>
2321 <doc>
2322 <![CDATA[Gets type literal for the given {@code Type} instance.]]>
2323 </doc>
2324 </method>
2325 <method name="get" return="com.google.inject.TypeLiteral&lt;T&gt;"
2326 abstract="false" native="false" synchronized="false"
2327 static="true" final="false" visibility="public"
2328 deprecated="not deprecated">
2329 <param name="type" type="java.lang.Class&lt;T&gt;"/>
2330 <doc>
2331 <![CDATA[Gets type literal for the given {@code Class} instance.]]>
2332 </doc>
2333 </method>
2334 <method name="getSupertype" return="com.google.inject.TypeLiteral&lt;?&gt;"
2335 abstract="false" native="false" synchronized="false"
2336 static="false" final="false" visibility="public"
2337 deprecated="not deprecated">
2338 <param name="supertype" type="java.lang.Class&lt;?&gt;"/>
2339 <doc>
2340 <![CDATA[Returns the generic form of {@code supertype}. For example, if this is {@code
2341 ArrayList<String>}, this returns {@code Iterable<String>} given the input {@code
2342 Iterable.class}.
2343
2344 @param supertype a superclass of, or interface implemented by, this.
2345 @since 2.0]]>
2346 </doc>
2347 </method>
2348 <method name="getFieldType" return="com.google.inject.TypeLiteral&lt;?&gt;"
2349 abstract="false" native="false" synchronized="false"
2350 static="false" final="false" visibility="public"
2351 deprecated="not deprecated">
2352 <param name="field" type="java.lang.reflect.Field"/>
2353 <doc>
2354 <![CDATA[Returns the resolved generic type of {@code field}.
2355
2356 @param field a field defined by this or any superclass.
2357 @since 2.0]]>
2358 </doc>
2359 </method>
2360 <method name="getParameterTypes" return="java.util.List&lt;com.google.inject.TypeLiteral&lt;?&gt;&gt;"
2361 abstract="false" native="false" synchronized="false"
2362 static="false" final="false" visibility="public"
2363 deprecated="not deprecated">
2364 <param name="methodOrConstructor" type="java.lang.reflect.Member"/>
2365 <doc>
2366 <![CDATA[Returns the resolved generic parameter types of {@code methodOrConstructor}.
2367
2368 @param methodOrConstructor a method or constructor defined by this or any supertype.
2369 @since 2.0]]>
2370 </doc>
2371 </method>
2372 <method name="getExceptionTypes" return="java.util.List&lt;com.google.inject.TypeLiteral&lt;?&gt;&gt;"
2373 abstract="false" native="false" synchronized="false"
2374 static="false" final="false" visibility="public"
2375 deprecated="not deprecated">
2376 <param name="methodOrConstructor" type="java.lang.reflect.Member"/>
2377 <doc>
2378 <![CDATA[Returns the resolved generic exception types thrown by {@code constructor}.
2379
2380 @param methodOrConstructor a method or constructor defined by this or any supertype.
2381 @since 2.0]]>
2382 </doc>
2383 </method>
2384 <method name="getReturnType" return="com.google.inject.TypeLiteral&lt;?&gt;"
2385 abstract="false" native="false" synchronized="false"
2386 static="false" final="false" visibility="public"
2387 deprecated="not deprecated">
2388 <param name="method" type="java.lang.reflect.Method"/>
2389 <doc>
2390 <![CDATA[Returns the resolved generic return type of {@code method}.
2391
2392 @param method a method defined by this or any supertype.
2393 @since 2.0]]>
2394 </doc>
2395 </method>
2396 <doc>
2397 <![CDATA[Represents a generic type {@code T}. Java doesn't yet provide a way to
2398 represent generic types, so this class does. Forces clients to create a
2399 subclass of this class which enables retrieval the type information even at
2400 runtime.
2401
2402 <p>For example, to create a type literal for {@code List<String>}, you can
2403 create an empty anonymous inner class:
2404
2405 <p>
2406 {@code TypeLiteral<List<String>> list = new TypeLiteral<List<String>>() {};}
2407
2408 <p>This syntax cannot be used to create type literals that have wildcard
2409 parameters, such as {@code Class<?>} or {@code List<? extends CharSequence>}.
2410 Such type literals must be constructed programatically, either by {@link
2411 Method#getGenericReturnType extracting types from members} or by using the
2412 {@link Types} factory class.
2413
2414 <p>Along with modeling generic types, this class can resolve type parameters.
2415 For example, to figure out what type {@code keySet()} returns on a {@code
2416 Map<Integer, String>}, use this code:<pre> {@code
2417
2418 TypeLiteral<Map<Integer, String>> mapType
2419 = new TypeLiteral<Map<Integer, String>>() {};
2420 TypeLiteral<?> keySetType
2421 = mapType.getReturnType(Map.class.getMethod("keySet"));
2422 System.out.println(keySetType); // prints "Set<Integer>"}</pre>
2423
2424 @author crazybob@google.com (Bob Lee)
2425 @author jessewilson@google.com (Jesse Wilson)]]>
2426 </doc>
2427 </class>
2428 <!-- end class com.google.inject.TypeLiteral -->
2429</package>
2430<package name="com.google.inject.assistedinject">
2431 <!-- start class com.google.inject.assistedinject.Assisted -->
2432 <class name="Assisted" abstract="true"
2433 static="false" final="false" visibility="public"
2434 deprecated="not deprecated">
2435 <implements name="java.lang.annotation.Annotation"/>
2436 <doc>
2437 <![CDATA[Annotates an injected parameter or field whose value comes from an argument to a factory method.
2438
2439 @author jmourits@google.com (Jerome Mourits)
2440 @author jessewilson@google.com (Jesse Wilson)]]>
2441 </doc>
2442 </class>
2443 <!-- end class com.google.inject.assistedinject.Assisted -->
2444 <!-- start class com.google.inject.assistedinject.AssistedInject -->
2445 <class name="AssistedInject" abstract="true"
2446 static="false" final="false" visibility="public"
2447 deprecated="{@link FactoryProvider} now works better with the standard {@literal @Inject}
2448 annotation. When using that annotation, parameters are matched by name and type rather than
2449 by position. In addition, values that use the standard {@literal @Inject} constructor
2450 annotation are eligible for method interception.">
2451 <implements name="java.lang.annotation.Annotation"/>
2452 <doc>
2453 <![CDATA[<p>Constructors annotated with {@code @AssistedInject} indicate that they can be instantiated by
2454 the {@link FactoryProvider}. Each constructor must exactly match one corresponding factory method
2455 within the factory interface.
2456
2457 <p>Constructor parameters must be either supplied by the factory interface and marked with
2458 <code>@Assisted</code>, or they must be injectable.
2459
2460 @deprecated {@link FactoryProvider} now works better with the standard {@literal @Inject}
2461 annotation. When using that annotation, parameters are matched by name and type rather than
2462 by position. In addition, values that use the standard {@literal @Inject} constructor
2463 annotation are eligible for method interception.
2464
2465 @author jmourits@google.com (Jerome Mourits)
2466 @author jessewilson@google.com (Jesse Wilson)]]>
2467 </doc>
2468 </class>
2469 <!-- end class com.google.inject.assistedinject.AssistedInject -->
2470 <!-- start class com.google.inject.assistedinject.FactoryProvider -->
2471 <class name="FactoryProvider" extends="java.lang.Object"
2472 abstract="false"
2473 static="false" final="false" visibility="public"
2474 deprecated="not deprecated">
2475 <implements name="com.google.inject.Provider&lt;F&gt;"/>
2476 <implements name="com.google.inject.spi.HasDependencies"/>
2477 <method name="newFactory" return="com.google.inject.Provider&lt;F&gt;"
2478 abstract="false" native="false" synchronized="false"
2479 static="true" final="false" visibility="public"
2480 deprecated="not deprecated">
2481 <param name="factoryType" type="java.lang.Class&lt;F&gt;"/>
2482 <param name="implementationType" type="java.lang.Class&lt;?&gt;"/>
2483 </method>
2484 <method name="newFactory" return="com.google.inject.Provider&lt;F&gt;"
2485 abstract="false" native="false" synchronized="false"
2486 static="true" final="false" visibility="public"
2487 deprecated="not deprecated">
2488 <param name="factoryType" type="com.google.inject.TypeLiteral&lt;F&gt;"/>
2489 <param name="implementationType" type="com.google.inject.TypeLiteral&lt;?&gt;"/>
2490 </method>
2491 <method name="getDependencies" return="java.util.Set&lt;com.google.inject.spi.Dependency&lt;?&gt;&gt;"
2492 abstract="false" native="false" synchronized="false"
2493 static="false" final="false" visibility="public"
2494 deprecated="not deprecated">
2495 </method>
2496 <method name="get" return="F"
2497 abstract="false" native="false" synchronized="false"
2498 static="false" final="false" visibility="public"
2499 deprecated="not deprecated">
2500 </method>
2501 <doc>
2502 <![CDATA[Provides a factory that combines the caller's arguments with injector-supplied values to
2503 construct objects.
2504
2505 <h3>Defining a factory</h3>
2506 Create an interface whose methods return the constructed type, or any of its supertypes. The
2507 method's parameters are the arguments required to build the constructed type.
2508 <pre>public interface PaymentFactory {
2509 Payment create(Date startDate, Money amount);
2510 }</pre>
2511 You can name your factory methods whatever you like, such as <i>create</i>, <i>createPayment</i>
2512 or <i>newPayment</i>.
2513
2514 <h3>Creating a type that accepts factory parameters</h3>
2515 {@code constructedType} is a concrete class with an {@literal @}{@link Inject}-annotated
2516 constructor. In addition to injector-supplied parameters, the constructor should have
2517 parameters that match each of the factory method's parameters. Each factory-supplied parameter
2518 requires an {@literal @}{@link Assisted} annotation. This serves to document that the parameter
2519 is not bound by your application's modules.
2520 <pre>public class RealPayment implements Payment {
2521 {@literal @}Inject
2522 public RealPayment(
2523 CreditService creditService,
2524 AuthService authService,
2525 <strong>{@literal @}Assisted Date startDate</strong>,
2526 <strong>{@literal @}Assisted Money amount</strong>) {
2527 ...
2528 }
2529 }</pre>
2530 Any parameter that permits a null value should also be annotated {@code @Nullable}.
2531
2532 <h3>Configuring factories</h3>
2533 In your {@link com.google.inject.Module module}, bind the factory interface to the returned
2534 factory:
2535 <pre>bind(PaymentFactory.class).toProvider(
2536 FactoryProvider.newFactory(PaymentFactory.class, RealPayment.class));</pre>
2537 As a side-effect of this binding, Guice will inject the factory to initialize it for use. The
2538 factory cannot be used until the injector has been initialized.
2539
2540 <h3>Using the factory</h3>
2541 Inject your factory into your application classes. When you use the factory, your arguments
2542 will be combined with values from the injector to construct an instance.
2543 <pre>public class PaymentAction {
2544 {@literal @}Inject private PaymentFactory paymentFactory;
2545
2546 public void doPayment(Money amount) {
2547 Payment payment = paymentFactory.create(new Date(), amount);
2548 payment.apply();
2549 }
2550 }</pre>
2551
2552 <h3>Making parameter types distinct</h3>
2553 The types of the factory method's parameters must be distinct. To use multiple parameters of
2554 the same type, use a named {@literal @}{@link Assisted} annotation to disambiguate the
2555 parameters. The names must be applied to the factory method's parameters:
2556
2557 <pre>public interface PaymentFactory {
2558 Payment create(
2559 <strong>{@literal @}Assisted("startDate")</strong> Date startDate,
2560 <strong>{@literal @}Assisted("dueDate")</strong> Date dueDate,
2561 Money amount);
2562 } </pre>
2563 ...and to the concrete type's constructor parameters:
2564 <pre>public class RealPayment implements Payment {
2565 {@literal @}Inject
2566 public RealPayment(
2567 CreditService creditService,
2568 AuthService authService,
2569 <strong>{@literal @}Assisted("startDate")</strong> Date startDate,
2570 <strong>{@literal @}Assisted("dueDate")</strong> Date dueDate,
2571 <strong>{@literal @}Assisted</strong> Money amount) {
2572 ...
2573 }
2574 }</pre>
2575
2576 <h3>Values are created by Guice</h3>
2577 Returned factories use child injectors to create values. The values are eligible for method
2578 interception. In addition, {@literal @}{@literal Inject} members will be injected before they are
2579 returned.
2580
2581 <h3>Backwards compatibility using {@literal @}AssistedInject</h3>
2582 Instead of the {@literal @}Inject annotation, you may annotate the constructed classes with
2583 {@literal @}{@link AssistedInject}. This triggers a limited backwards-compatability mode.
2584
2585 <p>Instead of matching factory method arguments to constructor parameters using their names, the
2586 <strong>parameters are matched by their order</strong>. The first factory method argument is
2587 used for the first {@literal @}Assisted constructor parameter, etc.. Annotation names have no
2588 effect.
2589
2590 <p>Returned values are <strong>not created by Guice</strong>. These types are not eligible for
2591 method interception. They do receive post-construction member injection.
2592
2593 @param <F> The factory interface
2594
2595 @author jmourits@google.com (Jerome Mourits)
2596 @author jessewilson@google.com (Jesse Wilson)
2597 @author dtm@google.com (Daniel Martin)]]>
2598 </doc>
2599 </class>
2600 <!-- end class com.google.inject.assistedinject.FactoryProvider -->
2601</package>
2602<package name="com.google.inject.binder">
2603 <!-- start interface com.google.inject.binder.AnnotatedBindingBuilder -->
2604 <interface name="AnnotatedBindingBuilder" abstract="true"
2605 static="false" final="false" visibility="public"
2606 deprecated="not deprecated">
2607 <implements name="com.google.inject.binder.LinkedBindingBuilder&lt;T&gt;"/>
2608 <method name="annotatedWith" return="com.google.inject.binder.LinkedBindingBuilder&lt;T&gt;"
2609 abstract="false" native="false" synchronized="false"
2610 static="false" final="false" visibility="public"
2611 deprecated="not deprecated">
2612 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
2613 <doc>
2614 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
2615 </doc>
2616 </method>
2617 <method name="annotatedWith" return="com.google.inject.binder.LinkedBindingBuilder&lt;T&gt;"
2618 abstract="false" native="false" synchronized="false"
2619 static="false" final="false" visibility="public"
2620 deprecated="not deprecated">
2621 <param name="annotation" type="java.lang.annotation.Annotation"/>
2622 <doc>
2623 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
2624 </doc>
2625 </method>
2626 <doc>
2627 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
2628
2629 @author crazybob@google.com (Bob Lee)]]>
2630 </doc>
2631 </interface>
2632 <!-- end interface com.google.inject.binder.AnnotatedBindingBuilder -->
2633 <!-- start interface com.google.inject.binder.AnnotatedConstantBindingBuilder -->
2634 <interface name="AnnotatedConstantBindingBuilder" abstract="true"
2635 static="false" final="false" visibility="public"
2636 deprecated="not deprecated">
2637 <method name="annotatedWith" return="com.google.inject.binder.ConstantBindingBuilder"
2638 abstract="false" native="false" synchronized="false"
2639 static="false" final="false" visibility="public"
2640 deprecated="not deprecated">
2641 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
2642 <doc>
2643 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
2644 </doc>
2645 </method>
2646 <method name="annotatedWith" return="com.google.inject.binder.ConstantBindingBuilder"
2647 abstract="false" native="false" synchronized="false"
2648 static="false" final="false" visibility="public"
2649 deprecated="not deprecated">
2650 <param name="annotation" type="java.lang.annotation.Annotation"/>
2651 <doc>
2652 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
2653 </doc>
2654 </method>
2655 <doc>
2656 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
2657
2658 @author crazybob@google.com (Bob Lee)]]>
2659 </doc>
2660 </interface>
2661 <!-- end interface com.google.inject.binder.AnnotatedConstantBindingBuilder -->
2662 <!-- start interface com.google.inject.binder.AnnotatedElementBuilder -->
2663 <interface name="AnnotatedElementBuilder" abstract="true"
2664 static="false" final="false" visibility="public"
2665 deprecated="not deprecated">
2666 <method name="annotatedWith"
2667 abstract="false" native="false" synchronized="false"
2668 static="false" final="false" visibility="public"
2669 deprecated="not deprecated">
2670 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
2671 <doc>
2672 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
2673 </doc>
2674 </method>
2675 <method name="annotatedWith"
2676 abstract="false" native="false" synchronized="false"
2677 static="false" final="false" visibility="public"
2678 deprecated="not deprecated">
2679 <param name="annotation" type="java.lang.annotation.Annotation"/>
2680 <doc>
2681 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
2682 </doc>
2683 </method>
2684 <doc>
2685 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
2686
2687 @author jessewilson@google.com (Jesse Wilson)
2688 @since 2.0]]>
2689 </doc>
2690 </interface>
2691 <!-- end interface com.google.inject.binder.AnnotatedElementBuilder -->
2692 <!-- start interface com.google.inject.binder.ConstantBindingBuilder -->
2693 <interface name="ConstantBindingBuilder" abstract="true"
2694 static="false" final="false" visibility="public"
2695 deprecated="not deprecated">
2696 <method name="to"
2697 abstract="false" native="false" synchronized="false"
2698 static="false" final="false" visibility="public"
2699 deprecated="not deprecated">
2700 <param name="value" type="java.lang.String"/>
2701 <doc>
2702 <![CDATA[Binds constant to the given value.]]>
2703 </doc>
2704 </method>
2705 <method name="to"
2706 abstract="false" native="false" synchronized="false"
2707 static="false" final="false" visibility="public"
2708 deprecated="not deprecated">
2709 <param name="value" type="int"/>
2710 <doc>
2711 <![CDATA[Binds constant to the given value.]]>
2712 </doc>
2713 </method>
2714 <method name="to"
2715 abstract="false" native="false" synchronized="false"
2716 static="false" final="false" visibility="public"
2717 deprecated="not deprecated">
2718 <param name="value" type="long"/>
2719 <doc>
2720 <![CDATA[Binds constant to the given value.]]>
2721 </doc>
2722 </method>
2723 <method name="to"
2724 abstract="false" native="false" synchronized="false"
2725 static="false" final="false" visibility="public"
2726 deprecated="not deprecated">
2727 <param name="value" type="boolean"/>
2728 <doc>
2729 <![CDATA[Binds constant to the given value.]]>
2730 </doc>
2731 </method>
2732 <method name="to"
2733 abstract="false" native="false" synchronized="false"
2734 static="false" final="false" visibility="public"
2735 deprecated="not deprecated">
2736 <param name="value" type="double"/>
2737 <doc>
2738 <![CDATA[Binds constant to the given value.]]>
2739 </doc>
2740 </method>
2741 <method name="to"
2742 abstract="false" native="false" synchronized="false"
2743 static="false" final="false" visibility="public"
2744 deprecated="not deprecated">
2745 <param name="value" type="float"/>
2746 <doc>
2747 <![CDATA[Binds constant to the given value.]]>
2748 </doc>
2749 </method>
2750 <method name="to"
2751 abstract="false" native="false" synchronized="false"
2752 static="false" final="false" visibility="public"
2753 deprecated="not deprecated">
2754 <param name="value" type="short"/>
2755 <doc>
2756 <![CDATA[Binds constant to the given value.]]>
2757 </doc>
2758 </method>
2759 <method name="to"
2760 abstract="false" native="false" synchronized="false"
2761 static="false" final="false" visibility="public"
2762 deprecated="not deprecated">
2763 <param name="value" type="char"/>
2764 <doc>
2765 <![CDATA[Binds constant to the given value.]]>
2766 </doc>
2767 </method>
2768 <method name="to"
2769 abstract="false" native="false" synchronized="false"
2770 static="false" final="false" visibility="public"
2771 deprecated="not deprecated">
2772 <param name="value" type="java.lang.Class&lt;?&gt;"/>
2773 <doc>
2774 <![CDATA[Binds constant to the given value.]]>
2775 </doc>
2776 </method>
2777 <method name="to"
2778 abstract="false" native="false" synchronized="false"
2779 static="false" final="false" visibility="public"
2780 deprecated="not deprecated">
2781 <param name="value" type="E extends java.lang.Enum&lt;E&gt;"/>
2782 <doc>
2783 <![CDATA[Binds constant to the given value.]]>
2784 </doc>
2785 </method>
2786 <doc>
2787 <![CDATA[Binds to a constant value.]]>
2788 </doc>
2789 </interface>
2790 <!-- end interface com.google.inject.binder.ConstantBindingBuilder -->
2791 <!-- start interface com.google.inject.binder.LinkedBindingBuilder -->
2792 <interface name="LinkedBindingBuilder" abstract="true"
2793 static="false" final="false" visibility="public"
2794 deprecated="not deprecated">
2795 <implements name="com.google.inject.binder.ScopedBindingBuilder"/>
2796 <method name="to" return="com.google.inject.binder.ScopedBindingBuilder"
2797 abstract="false" native="false" synchronized="false"
2798 static="false" final="false" visibility="public"
2799 deprecated="not deprecated">
2800 <param name="implementation" type="java.lang.Class&lt;? extends T&gt;"/>
2801 <doc>
2802 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
2803 </doc>
2804 </method>
2805 <method name="to" return="com.google.inject.binder.ScopedBindingBuilder"
2806 abstract="false" native="false" synchronized="false"
2807 static="false" final="false" visibility="public"
2808 deprecated="not deprecated">
2809 <param name="implementation" type="com.google.inject.TypeLiteral&lt;? extends T&gt;"/>
2810 <doc>
2811 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
2812 </doc>
2813 </method>
2814 <method name="to" return="com.google.inject.binder.ScopedBindingBuilder"
2815 abstract="false" native="false" synchronized="false"
2816 static="false" final="false" visibility="public"
2817 deprecated="not deprecated">
2818 <param name="targetKey" type="com.google.inject.Key&lt;? extends T&gt;"/>
2819 <doc>
2820 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
2821 </doc>
2822 </method>
2823 <method name="toInstance"
2824 abstract="false" native="false" synchronized="false"
2825 static="false" final="false" visibility="public"
2826 deprecated="not deprecated">
2827 <param name="instance" type="T"/>
2828 <doc>
2829 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
2830
2831 @see com.google.inject.Injector#injectMembers]]>
2832 </doc>
2833 </method>
2834 <method name="toProvider" return="com.google.inject.binder.ScopedBindingBuilder"
2835 abstract="false" native="false" synchronized="false"
2836 static="false" final="false" visibility="public"
2837 deprecated="not deprecated">
2838 <param name="provider" type="com.google.inject.Provider&lt;? extends T&gt;"/>
2839 <doc>
2840 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
2841
2842 @see com.google.inject.Injector#injectMembers]]>
2843 </doc>
2844 </method>
2845 <method name="toProvider" return="com.google.inject.binder.ScopedBindingBuilder"
2846 abstract="false" native="false" synchronized="false"
2847 static="false" final="false" visibility="public"
2848 deprecated="not deprecated">
2849 <param name="providerType" type="java.lang.Class&lt;? extends com.google.inject.Provider&lt;? extends T&gt;&gt;"/>
2850 <doc>
2851 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
2852 </doc>
2853 </method>
2854 <method name="toProvider" return="com.google.inject.binder.ScopedBindingBuilder"
2855 abstract="false" native="false" synchronized="false"
2856 static="false" final="false" visibility="public"
2857 deprecated="not deprecated">
2858 <param name="providerKey" type="com.google.inject.Key&lt;? extends com.google.inject.Provider&lt;? extends T&gt;&gt;"/>
2859 <doc>
2860 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
2861 </doc>
2862 </method>
2863 <doc>
2864 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
2865
2866 @author crazybob@google.com (Bob Lee)]]>
2867 </doc>
2868 </interface>
2869 <!-- end interface com.google.inject.binder.LinkedBindingBuilder -->
2870 <!-- start interface com.google.inject.binder.ScopedBindingBuilder -->
2871 <interface name="ScopedBindingBuilder" abstract="true"
2872 static="false" final="false" visibility="public"
2873 deprecated="not deprecated">
2874 <method name="in"
2875 abstract="false" native="false" synchronized="false"
2876 static="false" final="false" visibility="public"
2877 deprecated="not deprecated">
2878 <param name="scopeAnnotation" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
2879 <doc>
2880 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
2881 </doc>
2882 </method>
2883 <method name="in"
2884 abstract="false" native="false" synchronized="false"
2885 static="false" final="false" visibility="public"
2886 deprecated="not deprecated">
2887 <param name="scope" type="com.google.inject.Scope"/>
2888 <doc>
2889 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
2890 </doc>
2891 </method>
2892 <method name="asEagerSingleton"
2893 abstract="false" native="false" synchronized="false"
2894 static="false" final="false" visibility="public"
2895 deprecated="not deprecated">
2896 <doc>
2897 <![CDATA[Instructs the {@link com.google.inject.Injector} to eagerly initialize this
2898 singleton-scoped binding upon creation. Useful for application
2899 initialization logic. See the EDSL examples at
2900 {@link com.google.inject.Binder}.]]>
2901 </doc>
2902 </method>
2903 <doc>
2904 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
2905
2906 @author crazybob@google.com (Bob Lee)]]>
2907 </doc>
2908 </interface>
2909 <!-- end interface com.google.inject.binder.ScopedBindingBuilder -->
2910</package>
2911<package name="com.google.inject.jndi">
2912 <!-- start class com.google.inject.jndi.JndiIntegration -->
2913 <class name="JndiIntegration" extends="java.lang.Object"
2914 abstract="false"
2915 static="false" final="false" visibility="public"
2916 deprecated="not deprecated">
2917 <method name="fromJndi" return="com.google.inject.Provider&lt;T&gt;"
2918 abstract="false" native="false" synchronized="false"
2919 static="true" final="false" visibility="public"
2920 deprecated="not deprecated">
2921 <param name="type" type="java.lang.Class&lt;T&gt;"/>
2922 <param name="name" type="java.lang.String"/>
2923 <doc>
2924 <![CDATA[Creates a provider which looks up objects in JNDI using the given name.
2925 Example usage:
2926
2927 <pre>
2928 bind(DataSource.class).toProvider(fromJndi(DataSource.class, "java:..."));
2929 </pre>]]>
2930 </doc>
2931 </method>
2932 <doc>
2933 <![CDATA[Integrates Guice with JNDI. Requires a binding to
2934 {@link javax.naming.Context}.
2935
2936 @author crazybob@google.com (Bob Lee)]]>
2937 </doc>
2938 </class>
2939 <!-- end class com.google.inject.jndi.JndiIntegration -->
2940</package>
2941<package name="com.google.inject.matcher">
2942 <!-- start class com.google.inject.matcher.AbstractMatcher -->
2943 <class name="AbstractMatcher" extends="java.lang.Object"
2944 abstract="true"
2945 static="false" final="false" visibility="public"
2946 deprecated="not deprecated">
2947 <implements name="com.google.inject.matcher.Matcher&lt;T&gt;"/>
2948 <constructor name="AbstractMatcher"
2949 static="false" final="false" visibility="public"
2950 deprecated="not deprecated">
2951 </constructor>
2952 <method name="and" return="com.google.inject.matcher.Matcher&lt;T&gt;"
2953 abstract="false" native="false" synchronized="false"
2954 static="false" final="false" visibility="public"
2955 deprecated="not deprecated">
2956 <param name="other" type="com.google.inject.matcher.Matcher&lt;? super T&gt;"/>
2957 </method>
2958 <method name="or" return="com.google.inject.matcher.Matcher&lt;T&gt;"
2959 abstract="false" native="false" synchronized="false"
2960 static="false" final="false" visibility="public"
2961 deprecated="not deprecated">
2962 <param name="other" type="com.google.inject.matcher.Matcher&lt;? super T&gt;"/>
2963 </method>
2964 <doc>
2965 <![CDATA[Implements {@code and()} and {@code or()}.
2966
2967 @author crazybob@google.com (Bob Lee)]]>
2968 </doc>
2969 </class>
2970 <!-- end class com.google.inject.matcher.AbstractMatcher -->
2971 <!-- start interface com.google.inject.matcher.Matcher -->
2972 <interface name="Matcher" abstract="true"
2973 static="false" final="false" visibility="public"
2974 deprecated="not deprecated">
2975 <method name="matches" return="boolean"
2976 abstract="false" native="false" synchronized="false"
2977 static="false" final="false" visibility="public"
2978 deprecated="not deprecated">
2979 <param name="t" type="T"/>
2980 <doc>
2981 <![CDATA[Returns {@code true} if this matches {@code t}, {@code false} otherwise.]]>
2982 </doc>
2983 </method>
2984 <method name="and" return="com.google.inject.matcher.Matcher&lt;T&gt;"
2985 abstract="false" native="false" synchronized="false"
2986 static="false" final="false" visibility="public"
2987 deprecated="not deprecated">
2988 <param name="other" type="com.google.inject.matcher.Matcher&lt;? super T&gt;"/>
2989 <doc>
2990 <![CDATA[Returns a new matcher which returns {@code true} if both this and the
2991 given matcher return {@code true}.]]>
2992 </doc>
2993 </method>
2994 <method name="or" return="com.google.inject.matcher.Matcher&lt;T&gt;"
2995 abstract="false" native="false" synchronized="false"
2996 static="false" final="false" visibility="public"
2997 deprecated="not deprecated">
2998 <param name="other" type="com.google.inject.matcher.Matcher&lt;? super T&gt;"/>
2999 <doc>
3000 <![CDATA[Returns a new matcher which returns {@code true} if either this or the
3001 given matcher return {@code true}.]]>
3002 </doc>
3003 </method>
3004 <doc>
3005 <![CDATA[Returns {@code true} or {@code false} for a given input.
3006
3007 @author crazybob@google.com (Bob Lee)]]>
3008 </doc>
3009 </interface>
3010 <!-- end interface com.google.inject.matcher.Matcher -->
3011 <!-- start class com.google.inject.matcher.Matchers -->
3012 <class name="Matchers" extends="java.lang.Object"
3013 abstract="false"
3014 static="false" final="false" visibility="public"
3015 deprecated="not deprecated">
3016 <method name="any" return="com.google.inject.matcher.Matcher&lt;java.lang.Object&gt;"
3017 abstract="false" native="false" synchronized="false"
3018 static="true" final="false" visibility="public"
3019 deprecated="not deprecated">
3020 <doc>
3021 <![CDATA[Returns a matcher which matches any input.]]>
3022 </doc>
3023 </method>
3024 <method name="not" return="com.google.inject.matcher.Matcher&lt;T&gt;"
3025 abstract="false" native="false" synchronized="false"
3026 static="true" final="false" visibility="public"
3027 deprecated="not deprecated">
3028 <param name="p" type="com.google.inject.matcher.Matcher&lt;? super T&gt;"/>
3029 <doc>
3030 <![CDATA[Inverts the given matcher.]]>
3031 </doc>
3032 </method>
3033 <method name="annotatedWith" return="com.google.inject.matcher.Matcher&lt;java.lang.reflect.AnnotatedElement&gt;"
3034 abstract="false" native="false" synchronized="false"
3035 static="true" final="false" visibility="public"
3036 deprecated="not deprecated">
3037 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
3038 <doc>
3039 <![CDATA[Returns a matcher which matches elements (methods, classes, etc.)
3040 with a given annotation.]]>
3041 </doc>
3042 </method>
3043 <method name="annotatedWith" return="com.google.inject.matcher.Matcher&lt;java.lang.reflect.AnnotatedElement&gt;"
3044 abstract="false" native="false" synchronized="false"
3045 static="true" final="false" visibility="public"
3046 deprecated="not deprecated">
3047 <param name="annotation" type="java.lang.annotation.Annotation"/>
3048 <doc>
3049 <![CDATA[Returns a matcher which matches elements (methods, classes, etc.)
3050 with a given annotation.]]>
3051 </doc>
3052 </method>
3053 <method name="subclassesOf" return="com.google.inject.matcher.Matcher&lt;java.lang.Class&gt;"
3054 abstract="false" native="false" synchronized="false"
3055 static="true" final="false" visibility="public"
3056 deprecated="not deprecated">
3057 <param name="superclass" type="java.lang.Class&lt;?&gt;"/>
3058 <doc>
3059 <![CDATA[Returns a matcher which matches subclasses of the given type (as well as
3060 the given type).]]>
3061 </doc>
3062 </method>
3063 <method name="only" return="com.google.inject.matcher.Matcher&lt;java.lang.Object&gt;"
3064 abstract="false" native="false" synchronized="false"
3065 static="true" final="false" visibility="public"
3066 deprecated="not deprecated">
3067 <param name="value" type="java.lang.Object"/>
3068 <doc>
3069 <![CDATA[Returns a matcher which matches objects equal to the given object.]]>
3070 </doc>
3071 </method>
3072 <method name="identicalTo" return="com.google.inject.matcher.Matcher&lt;java.lang.Object&gt;"
3073 abstract="false" native="false" synchronized="false"
3074 static="true" final="false" visibility="public"
3075 deprecated="not deprecated">
3076 <param name="value" type="java.lang.Object"/>
3077 <doc>
3078 <![CDATA[Returns a matcher which matches only the given object.]]>
3079 </doc>
3080 </method>
3081 <method name="inPackage" return="com.google.inject.matcher.Matcher&lt;java.lang.Class&gt;"
3082 abstract="false" native="false" synchronized="false"
3083 static="true" final="false" visibility="public"
3084 deprecated="not deprecated">
3085 <param name="targetPackage" type="java.lang.Package"/>
3086 <doc>
3087 <![CDATA[Returns a matcher which matches classes in the given package. Packages are specific to their
3088 classloader, so classes with the same package name may not have the same package at runtime.]]>
3089 </doc>
3090 </method>
3091 <method name="inSubpackage" return="com.google.inject.matcher.Matcher&lt;java.lang.Class&gt;"
3092 abstract="false" native="false" synchronized="false"
3093 static="true" final="false" visibility="public"
3094 deprecated="not deprecated">
3095 <param name="targetPackageName" type="java.lang.String"/>
3096 <doc>
3097 <![CDATA[Returns a matcher which matches classes in the given package and its subpackages. Unlike
3098 {@link #inPackage(Package) inPackage()}, this matches classes from any classloader.
3099
3100 @since 2.0]]>
3101 </doc>
3102 </method>
3103 <method name="returns" return="com.google.inject.matcher.Matcher&lt;java.lang.reflect.Method&gt;"
3104 abstract="false" native="false" synchronized="false"
3105 static="true" final="false" visibility="public"
3106 deprecated="not deprecated">
3107 <param name="returnType" type="com.google.inject.matcher.Matcher&lt;? super java.lang.Class&lt;?&gt;&gt;"/>
3108 <doc>
3109 <![CDATA[Returns a matcher which matches methods with matching return types.]]>
3110 </doc>
3111 </method>
3112 <doc>
3113 <![CDATA[Matcher implementations. Supports matching classes and methods.
3114
3115 @author crazybob@google.com (Bob Lee)]]>
3116 </doc>
3117 </class>
3118 <!-- end class com.google.inject.matcher.Matchers -->
3119</package>
3120<package name="com.google.inject.multibindings">
3121 <!-- start class com.google.inject.multibindings.MapBinder -->
3122 <class name="MapBinder" extends="java.lang.Object"
3123 abstract="true"
3124 static="false" final="false" visibility="public"
3125 deprecated="not deprecated">
3126 <method name="newMapBinder" return="com.google.inject.multibindings.MapBinder&lt;K, V&gt;"
3127 abstract="false" native="false" synchronized="false"
3128 static="true" final="false" visibility="public"
3129 deprecated="not deprecated">
3130 <param name="binder" type="com.google.inject.Binder"/>
3131 <param name="keyType" type="com.google.inject.TypeLiteral&lt;K&gt;"/>
3132 <param name="valueType" type="com.google.inject.TypeLiteral&lt;V&gt;"/>
3133 <doc>
3134 <![CDATA[Returns a new mapbinder that collects entries of {@code keyType}/{@code valueType} in a
3135 {@link Map} that is itself bound with no binding annotation.]]>
3136 </doc>
3137 </method>
3138 <method name="newMapBinder" return="com.google.inject.multibindings.MapBinder&lt;K, V&gt;"
3139 abstract="false" native="false" synchronized="false"
3140 static="true" final="false" visibility="public"
3141 deprecated="not deprecated">
3142 <param name="binder" type="com.google.inject.Binder"/>
3143 <param name="keyType" type="java.lang.Class&lt;K&gt;"/>
3144 <param name="valueType" type="java.lang.Class&lt;V&gt;"/>
3145 <doc>
3146 <![CDATA[Returns a new mapbinder that collects entries of {@code keyType}/{@code valueType} in a
3147 {@link Map} that is itself bound with no binding annotation.]]>
3148 </doc>
3149 </method>
3150 <method name="newMapBinder" return="com.google.inject.multibindings.MapBinder&lt;K, V&gt;"
3151 abstract="false" native="false" synchronized="false"
3152 static="true" final="false" visibility="public"
3153 deprecated="not deprecated">
3154 <param name="binder" type="com.google.inject.Binder"/>
3155 <param name="keyType" type="com.google.inject.TypeLiteral&lt;K&gt;"/>
3156 <param name="valueType" type="com.google.inject.TypeLiteral&lt;V&gt;"/>
3157 <param name="annotation" type="java.lang.annotation.Annotation"/>
3158 <doc>
3159 <![CDATA[Returns a new mapbinder that collects entries of {@code keyType}/{@code valueType} in a
3160 {@link Map} that is itself bound with {@code annotation}.]]>
3161 </doc>
3162 </method>
3163 <method name="newMapBinder" return="com.google.inject.multibindings.MapBinder&lt;K, V&gt;"
3164 abstract="false" native="false" synchronized="false"
3165 static="true" final="false" visibility="public"
3166 deprecated="not deprecated">
3167 <param name="binder" type="com.google.inject.Binder"/>
3168 <param name="keyType" type="java.lang.Class&lt;K&gt;"/>
3169 <param name="valueType" type="java.lang.Class&lt;V&gt;"/>
3170 <param name="annotation" type="java.lang.annotation.Annotation"/>
3171 <doc>
3172 <![CDATA[Returns a new mapbinder that collects entries of {@code keyType}/{@code valueType} in a
3173 {@link Map} that is itself bound with {@code annotation}.]]>
3174 </doc>
3175 </method>
3176 <method name="newMapBinder" return="com.google.inject.multibindings.MapBinder&lt;K, V&gt;"
3177 abstract="false" native="false" synchronized="false"
3178 static="true" final="false" visibility="public"
3179 deprecated="not deprecated">
3180 <param name="binder" type="com.google.inject.Binder"/>
3181 <param name="keyType" type="com.google.inject.TypeLiteral&lt;K&gt;"/>
3182 <param name="valueType" type="com.google.inject.TypeLiteral&lt;V&gt;"/>
3183 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
3184 <doc>
3185 <![CDATA[Returns a new mapbinder that collects entries of {@code keyType}/{@code valueType} in a
3186 {@link Map} that is itself bound with {@code annotationType}.]]>
3187 </doc>
3188 </method>
3189 <method name="newMapBinder" return="com.google.inject.multibindings.MapBinder&lt;K, V&gt;"
3190 abstract="false" native="false" synchronized="false"
3191 static="true" final="false" visibility="public"
3192 deprecated="not deprecated">
3193 <param name="binder" type="com.google.inject.Binder"/>
3194 <param name="keyType" type="java.lang.Class&lt;K&gt;"/>
3195 <param name="valueType" type="java.lang.Class&lt;V&gt;"/>
3196 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
3197 <doc>
3198 <![CDATA[Returns a new mapbinder that collects entries of {@code keyType}/{@code valueType} in a
3199 {@link Map} that is itself bound with {@code annotationType}.]]>
3200 </doc>
3201 </method>
3202 <method name="addBinding" return="com.google.inject.binder.LinkedBindingBuilder&lt;V&gt;"
3203 abstract="true" native="false" synchronized="false"
3204 static="false" final="false" visibility="public"
3205 deprecated="not deprecated">
3206 <param name="key" type="K"/>
3207 <doc>
3208 <![CDATA[Returns a binding builder used to add a new entry in the map. Each
3209 key must be distinct (and non-null). Bound providers will be evaluated each
3210 time the map is injected.
3211
3212 <p>It is an error to call this method without also calling one of the
3213 {@code to} methods on the returned binding builder.
3214
3215 <p>Scoping elements independently is supported. Use the {@code in} method
3216 to specify a binding scope.]]>
3217 </doc>
3218 </method>
3219 <doc>
3220 <![CDATA[An API to bind multiple map entries separately, only to later inject them as
3221 a complete map. MapBinder is intended for use in your application's module:
3222 <pre><code>
3223 public class SnacksModule extends AbstractModule {
3224 protected void configure() {
3225 MapBinder&lt;String, Snack&gt; mapbinder
3226 = MapBinder.newMapBinder(binder(), String.class, Snack.class);
3227 mapbinder.addBinding("twix").toInstance(new Twix());
3228 mapbinder.addBinding("snickers").toProvider(SnickersProvider.class);
3229 mapbinder.addBinding("skittles").to(Skittles.class);
3230 }
3231 }</code></pre>
3232
3233 <p>With this binding, a {@link Map}{@code <String, Snack>} can now be
3234 injected:
3235 <pre><code>
3236 class SnackMachine {
3237 {@literal @}Inject
3238 public SnackMachine(Map&lt;String, Snack&gt; snacks) { ... }
3239 }</code></pre>
3240
3241 <p>In addition to binding {@code Map<K, V>}, a mapbinder will also bind
3242 {@code Map<K, Provider<V>>} for lazy value provision:
3243 <pre><code>
3244 class SnackMachine {
3245 {@literal @}Inject
3246 public SnackMachine(Map&lt;String, Provider&lt;Snack&gt;&gt; snackProviders) { ... }
3247 }</code></pre>
3248
3249 <p>Creating mapbindings from different modules is supported. For example, it
3250 is okay to have both {@code CandyModule} and {@code ChipsModule} both
3251 create their own {@code MapBinder<String, Snack>}, and to each contribute
3252 bindings to the snacks map. When that map is injected, it will contain
3253 entries from both modules.
3254
3255 <p>Values are resolved at map injection time. If a value is bound to a
3256 provider, that provider's get method will be called each time the map is
3257 injected (unless the binding is also scoped, or a map of providers is injected).
3258
3259 <p>Annotations are used to create different maps of the same key/value
3260 type. Each distinct annotation gets its own independent map.
3261
3262 <p><strong>Keys must be distinct.</strong> If the same key is bound more than
3263 once, map injection will fail.
3264
3265 <p><strong>Keys must be non-null.</strong> {@code addBinding(null)} will
3266 throw an unchecked exception.
3267
3268 <p><strong>Values must be non-null to use map injection.</strong> If any
3269 value is null, map injection will fail (although injecting a map of providers
3270 will not).
3271
3272 @author dpb@google.com (David P. Baker)]]>
3273 </doc>
3274 </class>
3275 <!-- end class com.google.inject.multibindings.MapBinder -->
3276 <!-- start class com.google.inject.multibindings.Multibinder -->
3277 <class name="Multibinder" extends="java.lang.Object"
3278 abstract="true"
3279 static="false" final="false" visibility="public"
3280 deprecated="not deprecated">
3281 <method name="newSetBinder" return="com.google.inject.multibindings.Multibinder&lt;T&gt;"
3282 abstract="false" native="false" synchronized="false"
3283 static="true" final="false" visibility="public"
3284 deprecated="not deprecated">
3285 <param name="binder" type="com.google.inject.Binder"/>
3286 <param name="type" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
3287 <doc>
3288 <![CDATA[Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is
3289 itself bound with no binding annotation.]]>
3290 </doc>
3291 </method>
3292 <method name="newSetBinder" return="com.google.inject.multibindings.Multibinder&lt;T&gt;"
3293 abstract="false" native="false" synchronized="false"
3294 static="true" final="false" visibility="public"
3295 deprecated="not deprecated">
3296 <param name="binder" type="com.google.inject.Binder"/>
3297 <param name="type" type="java.lang.Class&lt;T&gt;"/>
3298 <doc>
3299 <![CDATA[Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is
3300 itself bound with no binding annotation.]]>
3301 </doc>
3302 </method>
3303 <method name="newSetBinder" return="com.google.inject.multibindings.Multibinder&lt;T&gt;"
3304 abstract="false" native="false" synchronized="false"
3305 static="true" final="false" visibility="public"
3306 deprecated="not deprecated">
3307 <param name="binder" type="com.google.inject.Binder"/>
3308 <param name="type" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
3309 <param name="annotation" type="java.lang.annotation.Annotation"/>
3310 <doc>
3311 <![CDATA[Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is
3312 itself bound with {@code annotation}.]]>
3313 </doc>
3314 </method>
3315 <method name="newSetBinder" return="com.google.inject.multibindings.Multibinder&lt;T&gt;"
3316 abstract="false" native="false" synchronized="false"
3317 static="true" final="false" visibility="public"
3318 deprecated="not deprecated">
3319 <param name="binder" type="com.google.inject.Binder"/>
3320 <param name="type" type="java.lang.Class&lt;T&gt;"/>
3321 <param name="annotation" type="java.lang.annotation.Annotation"/>
3322 <doc>
3323 <![CDATA[Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is
3324 itself bound with {@code annotation}.]]>
3325 </doc>
3326 </method>
3327 <method name="newSetBinder" return="com.google.inject.multibindings.Multibinder&lt;T&gt;"
3328 abstract="false" native="false" synchronized="false"
3329 static="true" final="false" visibility="public"
3330 deprecated="not deprecated">
3331 <param name="binder" type="com.google.inject.Binder"/>
3332 <param name="type" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
3333 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
3334 <doc>
3335 <![CDATA[Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is
3336 itself bound with {@code annotationType}.]]>
3337 </doc>
3338 </method>
3339 <method name="newSetBinder" return="com.google.inject.multibindings.Multibinder&lt;T&gt;"
3340 abstract="false" native="false" synchronized="false"
3341 static="true" final="false" visibility="public"
3342 deprecated="not deprecated">
3343 <param name="binder" type="com.google.inject.Binder"/>
3344 <param name="type" type="java.lang.Class&lt;T&gt;"/>
3345 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
3346 <doc>
3347 <![CDATA[Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is
3348 itself bound with {@code annotationType}.]]>
3349 </doc>
3350 </method>
3351 <method name="addBinding" return="com.google.inject.binder.LinkedBindingBuilder&lt;T&gt;"
3352 abstract="true" native="false" synchronized="false"
3353 static="false" final="false" visibility="public"
3354 deprecated="not deprecated">
3355 <doc>
3356 <![CDATA[Returns a binding builder used to add a new element in the set. Each
3357 bound element must have a distinct value. Bound providers will be
3358 evaluated each time the set is injected.
3359
3360 <p>It is an error to call this method without also calling one of the
3361 {@code to} methods on the returned binding builder.
3362
3363 <p>Scoping elements independently is supported. Use the {@code in} method
3364 to specify a binding scope.]]>
3365 </doc>
3366 </method>
3367 <doc>
3368 <![CDATA[An API to bind multiple values separately, only to later inject them as a
3369 complete collection. Multibinder is intended for use in your application's
3370 module:
3371 <pre><code>
3372 public class SnacksModule extends AbstractModule {
3373 protected void configure() {
3374 Multibinder&lt;Snack&gt; multibinder
3375 = Multibinder.newSetBinder(binder(), Snack.class);
3376 multibinder.addBinding().toInstance(new Twix());
3377 multibinder.addBinding().toProvider(SnickersProvider.class);
3378 multibinder.addBinding().to(Skittles.class);
3379 }
3380 }</code></pre>
3381
3382 <p>With this binding, a {@link Set}{@code <Snack>} can now be injected:
3383 <pre><code>
3384 class SnackMachine {
3385 {@literal @}Inject
3386 public SnackMachine(Set&lt;Snack&gt; snacks) { ... }
3387 }</code></pre>
3388
3389 <p>Create multibindings from different modules is supported. For example, it
3390 is okay to have both {@code CandyModule} and {@code ChipsModule} to both
3391 create their own {@code Multibinder<Snack>}, and to each contribute bindings
3392 to the set of snacks. When that set is injected, it will contain elements
3393 from both modules.
3394
3395 <p>Elements are resolved at set injection time. If an element is bound to a
3396 provider, that provider's get method will be called each time the set is
3397 injected (unless the binding is also scoped).
3398
3399 <p>Annotations are be used to create different sets of the same element
3400 type. Each distinct annotation gets its own independent collection of
3401 elements.
3402
3403 <p><strong>Elements must be distinct.</strong> If multiple bound elements
3404 have the same value, set injection will fail.
3405
3406 <p><strong>Elements must be non-null.</strong> If any set element is null,
3407 set injection will fail.
3408
3409 @author jessewilson@google.com (Jesse Wilson)]]>
3410 </doc>
3411 </class>
3412 <!-- end class com.google.inject.multibindings.Multibinder -->
3413</package>
3414<package name="com.google.inject.name">
3415 <!-- start class com.google.inject.name.Named -->
3416 <class name="Named" abstract="true"
3417 static="false" final="false" visibility="public"
3418 deprecated="not deprecated">
3419 <implements name="java.lang.annotation.Annotation"/>
3420 <doc>
3421 <![CDATA[Annotates named things.
3422
3423 @author crazybob@google.com (Bob Lee)]]>
3424 </doc>
3425 </class>
3426 <!-- end class com.google.inject.name.Named -->
3427 <!-- start class com.google.inject.name.Names -->
3428 <class name="Names" extends="java.lang.Object"
3429 abstract="false"
3430 static="false" final="false" visibility="public"
3431 deprecated="not deprecated">
3432 <method name="named" return="com.google.inject.name.Named"
3433 abstract="false" native="false" synchronized="false"
3434 static="true" final="false" visibility="public"
3435 deprecated="not deprecated">
3436 <param name="name" type="java.lang.String"/>
3437 <doc>
3438 <![CDATA[Creates a {@link Named} annotation with {@code name} as the value.]]>
3439 </doc>
3440 </method>
3441 <method name="bindProperties"
3442 abstract="false" native="false" synchronized="false"
3443 static="true" final="false" visibility="public"
3444 deprecated="not deprecated">
3445 <param name="binder" type="com.google.inject.Binder"/>
3446 <param name="properties" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;"/>
3447 <doc>
3448 <![CDATA[Creates a constant binding to {@code @Named(key)} for each entry in
3449 {@code properties}.]]>
3450 </doc>
3451 </method>
3452 <method name="bindProperties"
3453 abstract="false" native="false" synchronized="false"
3454 static="true" final="false" visibility="public"
3455 deprecated="not deprecated">
3456 <param name="binder" type="com.google.inject.Binder"/>
3457 <param name="properties" type="java.util.Properties"/>
3458 <doc>
3459 <![CDATA[Creates a constant binding to {@code @Named(key)} for each property. This
3460 method binds all properties including those inherited from
3461 {@link Properties#defaults defaults}.]]>
3462 </doc>
3463 </method>
3464 <doc>
3465 <![CDATA[Utility methods for use with {@code @}{@link Named}.
3466
3467 @author crazybob@google.com (Bob Lee)]]>
3468 </doc>
3469 </class>
3470 <!-- end class com.google.inject.name.Names -->
3471</package>
3472<package name="com.google.inject.servlet">
3473 <!-- start class com.google.inject.servlet.GuiceFilter -->
3474 <class name="GuiceFilter" extends="java.lang.Object"
3475 abstract="false"
3476 static="false" final="false" visibility="public"
3477 deprecated="not deprecated">
3478 <constructor name="GuiceFilter"
3479 static="false" final="false" visibility="public"
3480 deprecated="not deprecated">
3481 </constructor>
3482 <method name="doFilter"
3483 abstract="false" native="false" synchronized="false"
3484 static="false" final="false" visibility="public"
3485 deprecated="not deprecated">
3486 <param name="servletRequest" type="ServletRequest"/>
3487 <param name="servletResponse" type="ServletResponse"/>
3488 <param name="filterChain" type="FilterChain"/>
3489 <exception name="IOException" type="java.io.IOException"/>
3490 <exception name="ServletException" type="ServletException"/>
3491 </method>
3492 <method name="init"
3493 abstract="false" native="false" synchronized="false"
3494 static="false" final="false" visibility="public"
3495 deprecated="not deprecated">
3496 <param name="filterConfig" type="FilterConfig"/>
3497 <exception name="ServletException" type="ServletException"/>
3498 </method>
3499 <method name="destroy"
3500 abstract="false" native="false" synchronized="false"
3501 static="false" final="false" visibility="public"
3502 deprecated="not deprecated">
3503 </method>
3504 <doc>
3505 <![CDATA[<p>
3506 Apply this filter in web.xml above all other filters (typically), to all requests where you plan
3507 to use servlet scopes. This is also needed in order to dispatch requests to injectable filters
3508 and servlets:
3509 <pre>
3510 &lt;filter&gt;
3511 &lt;filter-name&gt;guiceFilter&lt;/filter-name&gt;
3512 &lt;filter-class&gt;<b>com.google.inject.servlet.GuiceFilter</b>&lt;/filter-class&gt;
3513 &lt;/filter&gt;
3514
3515 &lt;filter-mapping&gt;
3516 &lt;filter-name&gt;guiceFilter&lt;/filter-name&gt;
3517 &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
3518 &lt;/filter-mapping&gt;
3519 </pre>
3520
3521 This filter must appear before every filter that makes use of Guice injection or servlet
3522 scopes functionality. Typically, you will only register this filter in web.xml and register
3523 any other filters (and servlets) using a {@link ServletModule}.
3524
3525 @author crazybob@google.com (Bob Lee)
3526 @author dhanji@gmail.com (Dhanji R. Prasanna)]]>
3527 </doc>
3528 </class>
3529 <!-- end class com.google.inject.servlet.GuiceFilter -->
3530 <!-- start class com.google.inject.servlet.GuiceServletContextListener -->
3531 <class name="GuiceServletContextListener" extends="java.lang.Object"
3532 abstract="true"
3533 static="false" final="false" visibility="public"
3534 deprecated="not deprecated">
3535 <constructor name="GuiceServletContextListener"
3536 static="false" final="false" visibility="public"
3537 deprecated="not deprecated">
3538 </constructor>
3539 <method name="contextInitialized"
3540 abstract="false" native="false" synchronized="false"
3541 static="false" final="false" visibility="public"
3542 deprecated="not deprecated">
3543 <param name="servletContextEvent" type="ServletContextEvent"/>
3544 </method>
3545 <method name="contextDestroyed"
3546 abstract="false" native="false" synchronized="false"
3547 static="false" final="false" visibility="public"
3548 deprecated="not deprecated">
3549 <param name="servletContextEvent" type="ServletContextEvent"/>
3550 </method>
3551 <method name="getInjector" return="com.google.inject.Injector"
3552 abstract="true" native="false" synchronized="false"
3553 static="false" final="false" visibility="protected"
3554 deprecated="not deprecated">
3555 <doc>
3556 <![CDATA[Override this method to create (or otherwise obtain a reference to) your
3557 injector.]]>
3558 </doc>
3559 </method>
3560 <doc>
3561 <![CDATA[As of Guice 2.0 you can still use (your subclasses of) {@code GuiceServletContextListener}
3562 class as a logical place to create and configure your injector. This will ensure the injector
3563 is created when the web application is deployed.
3564
3565 @author Kevin Bourrillion (kevinb@google.com)
3566 @since 2.0]]>
3567 </doc>
3568 </class>
3569 <!-- end class com.google.inject.servlet.GuiceServletContextListener -->
3570 <!-- start class com.google.inject.servlet.RequestParameters -->
3571 <class name="RequestParameters" abstract="true"
3572 static="false" final="false" visibility="public"
3573 deprecated="not deprecated">
3574 <implements name="java.lang.annotation.Annotation"/>
3575 <doc>
3576 <![CDATA[Apply this to field or parameters of type {@code Map<String, String[]>}
3577 when you want the HTTP request parameter map to be injected.
3578
3579 @author crazybob@google.com (Bob Lee)]]>
3580 </doc>
3581 </class>
3582 <!-- end class com.google.inject.servlet.RequestParameters -->
3583 <!-- start class com.google.inject.servlet.RequestScoped -->
3584 <class name="RequestScoped" abstract="true"
3585 static="false" final="false" visibility="public"
3586 deprecated="not deprecated">
3587 <implements name="java.lang.annotation.Annotation"/>
3588 <doc>
3589 <![CDATA[Apply this to implementation classes when you want one instance per request.
3590
3591 @author crazybob@google.com (Bob Lee)]]>
3592 </doc>
3593 </class>
3594 <!-- end class com.google.inject.servlet.RequestScoped -->
3595 <!-- start class com.google.inject.servlet.ServletModule -->
3596 <class name="ServletModule" extends="com.google.inject.AbstractModule"
3597 abstract="false"
3598 static="false" final="false" visibility="public"
3599 deprecated="not deprecated">
3600 <constructor name="ServletModule"
3601 static="false" final="false" visibility="public"
3602 deprecated="not deprecated">
3603 </constructor>
3604 <method name="configure"
3605 abstract="false" native="false" synchronized="false"
3606 static="false" final="true" visibility="protected"
3607 deprecated="not deprecated">
3608 </method>
3609 <method name="configureServlets"
3610 abstract="false" native="false" synchronized="false"
3611 static="false" final="false" visibility="protected"
3612 deprecated="not deprecated">
3613 <doc>
3614 <![CDATA[<h3>Servlet Mapping EDSL</h3>
3615
3616 <p> Part of the EDSL builder language for configuring servlets
3617 and filters with guice-servlet. Think of this as an in-code replacement for web.xml.
3618 Filters and servlets are configured here using simple java method calls. Here is a typical
3619 example of registering a filter when creating your Guice injector:
3620
3621 <pre>
3622 Guice.createInjector(..., new ServletModule() {
3623
3624 {@literal @}Override
3625 protected void configureServlets() {
3626 <b>serve("*.html").with(MyServlet.class)</b>
3627 }
3628 }
3629 </pre>
3630
3631 This registers a servlet (subclass of {@code HttpServlet}) called {@code MyServlet} to service
3632 any web pages ending in {@code .html}. You can also use a path-style syntax to register
3633 servlets:
3634
3635 <pre>
3636 <b>serve("/my/*").with(MyServlet.class)</b>
3637 </pre>
3638
3639 Every servlet (or filter) is required to be a singleton. If you cannot annotate the class
3640 directly, you should add a separate {@code bind(..).in(Singleton.class)} rule elsewhere in
3641 your module. Mapping a servlet that is bound under any other scope is an error.
3642
3643 <p>
3644 <h4>Dispatch Order</h4>
3645 You are free to register as many servlets and filters as you like this way. They will
3646 be compared and dispatched in the order in which the filter methods are called:
3647
3648 <pre>
3649
3650 Guice.createInjector(..., new ServletModule() {
3651
3652 {@literal @}Override
3653 protected void configureServlets() {
3654 filter("/*").through(MyFilter.class);
3655 filter("*.css").through(MyCssFilter.class);
3656 // etc..
3657
3658 serve("*.html").with(MyServlet.class);
3659 serve("/my/*").with(MyServlet.class);
3660 // etc..
3661 }
3662 }
3663 </pre>
3664 This will traverse down the list of rules in lexical order. For example, a url
3665 "{@code /my/file.js}" (after it runs through the matching filters) will first
3666 be compared against the servlet mapping:
3667
3668 <pre>
3669 serve("*.html").with(MyServlet.class);
3670 </pre>
3671 And failing that, it will descend to the next servlet mapping:
3672
3673 <pre>
3674 serve("/my/*").with(MyServlet.class);
3675 </pre>
3676
3677 Since this rule matches, Guice Servlet will dispatch to {@code MyServlet}. These
3678 two mapping rules can also be written in more compact form using varargs syntax:
3679
3680 <pre>
3681 serve(<b>"*.html", "/my/*"</b>).with(MyServlet.class);
3682 </pre>
3683
3684 This way you can map several URI patterns to the same servlet. A similar syntax is
3685 also available for filter mappings.
3686
3687 <p>
3688 <h4>Regular Expressions</h4>
3689 You can also map servlets (or filters) to URIs using regular expressions:
3690 <pre>
3691 <b>serveRegex("(.)*ajax(.)*").with(MyAjaxServlet.class)</b>
3692 </pre>
3693
3694 This will map any URI containing the text "ajax" in it to {@code MyAjaxServlet}. Such as:
3695 <ul>
3696 <li>http://www.google.com/ajax.html</li>
3697 <li>http://www.google.com/content/ajax/index</li>
3698 <li>http://www.google.com/it/is_totally_ajaxian</li>
3699 </ul>
3700
3701
3702 <h3>Initialization Parameters</h3>
3703
3704 Servlets (and filters) allow you to pass in init params
3705 using the {@code <init-param>} tag in web.xml. You can similarly pass in parameters to
3706 Servlets and filters registered in Guice-servlet using a {@link java.util.Map} of parameter
3707 name/value pairs. For example, to initialize {@code MyServlet} with two parameters
3708 ({@code name="Dhanji", site="google.com"}) you could write:
3709
3710 <pre>
3711 Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
3712 params.put("name", "Dhanji");
3713 params.put("site", "google.com");
3714
3715 ...
3716 serve("/*").with(MyServlet.class, <b>params</b>)
3717 </pre>
3718
3719 <p>
3720 <h3>Binding Keys</h3>
3721
3722 You can also bind keys rather than classes. This lets you hide
3723 implementations with package-local visbility and expose them using
3724 only a Guice module and an annotation:
3725
3726 <pre>
3727 ...
3728 filter("/*").through(<b>Key.get(Filter.class, Fave.class)</b>);
3729 </pre>
3730
3731 Where {@code Filter.class} refers to the Servlet API interface and {@code Fave.class} is a
3732 custom binding annotation. Elsewhere (in one of your own modules) you can bind this
3733 filter's implementation:
3734
3735 <pre>
3736 bind(Filter.class)<b>.annotatedWith(Fave.class)</b>.to(MyFilterImpl.class);
3737 </pre>
3738
3739 See {@link com.google.inject.Binder} for more information on binding syntax.
3740
3741 <p>
3742 <h3>Multiple Modules</h3>
3743
3744 It is sometimes useful to capture servlet and filter mappings from multiple different
3745 modules. This is essential if you want to package and offer drop-in Guice plugins that
3746 provide servlet functionality.
3747
3748 <p>
3749 Guice Servlet allows you to register several instances of {@code ServletModule} to your
3750 injector. The order in which these modules are installed determines the dispatch order
3751 of filters and the precedence order of servlets. For example, if you had two servlet modules,
3752 {@code RpcModule} and {@code WebServiceModule} and they each contained a filter that mapped
3753 to the same URI pattern, {@code "/*"}:
3754
3755 <p>
3756 In {@code RpcModule}:
3757 <pre>
3758 filter("/*").through(RpcFilter.class);
3759 </pre>
3760
3761 In {@code WebServiceModule}:
3762 <pre>
3763 filter("/*").through(WebServiceFilter.class);
3764 </pre>
3765
3766 Then the order in which these filters are dispatched is determined by the order in which
3767 the modules are installed:
3768
3769 <pre>
3770 <b>install(new WebServiceModule());</b>
3771 install(new RpcModule());
3772 </pre>
3773
3774 In the case shown above {@code WebServiceFilter} will run first.
3775
3776 @since 2.0]]>
3777 </doc>
3778 </method>
3779 <method name="filter" return="com.google.inject.servlet.ServletModule.FilterKeyBindingBuilder"
3780 abstract="false" native="false" synchronized="false"
3781 static="false" final="true" visibility="protected"
3782 deprecated="not deprecated">
3783 <param name="urlPattern" type="java.lang.String"/>
3784 <param name="morePatterns" type="java.lang.String[]"/>
3785 <doc>
3786 <![CDATA[@param urlPattern Any Servlet-style pattern. examples: /*, /html/*, *.html, etc.
3787 @since 2.0]]>
3788 </doc>
3789 </method>
3790 <method name="filterRegex" return="com.google.inject.servlet.ServletModule.FilterKeyBindingBuilder"
3791 abstract="false" native="false" synchronized="false"
3792 static="false" final="true" visibility="protected"
3793 deprecated="not deprecated">
3794 <param name="regex" type="java.lang.String"/>
3795 <param name="regexes" type="java.lang.String[]"/>
3796 <doc>
3797 <![CDATA[@param regex Any Java-style regular expression.
3798 @since 2.0]]>
3799 </doc>
3800 </method>
3801 <method name="serve" return="com.google.inject.servlet.ServletModule.ServletKeyBindingBuilder"
3802 abstract="false" native="false" synchronized="false"
3803 static="false" final="true" visibility="protected"
3804 deprecated="not deprecated">
3805 <param name="urlPattern" type="java.lang.String"/>
3806 <param name="morePatterns" type="java.lang.String[]"/>
3807 <doc>
3808 <![CDATA[@param urlPattern Any Servlet-style pattern. examples: /*, /html/*, *.html, etc.
3809 @since 2.0]]>
3810 </doc>
3811 </method>
3812 <method name="serveRegex" return="com.google.inject.servlet.ServletModule.ServletKeyBindingBuilder"
3813 abstract="false" native="false" synchronized="false"
3814 static="false" final="true" visibility="protected"
3815 deprecated="not deprecated">
3816 <param name="regex" type="java.lang.String"/>
3817 <param name="regexes" type="java.lang.String[]"/>
3818 <doc>
3819 <![CDATA[@param regex Any Java-style regular expression.
3820 @since 2.0]]>
3821 </doc>
3822 </method>
3823 <doc>
3824 <![CDATA[Configures the servlet scopes and creates bindings for the servlet API
3825 objects so you can inject the request, response, session, etc.
3826
3827 <p>
3828 You should subclass this module to register servlets and
3829 filters in the {@link #configureServlets()} method.
3830
3831 @author crazybob@google.com (Bob Lee)
3832 @author dhanji@gmail.com (Dhanji R. Prasanna)]]>
3833 </doc>
3834 </class>
3835 <!-- end class com.google.inject.servlet.ServletModule -->
3836 <!-- start interface com.google.inject.servlet.ServletModule.FilterKeyBindingBuilder -->
3837 <interface name="ServletModule.FilterKeyBindingBuilder" abstract="true"
3838 static="true" final="false" visibility="public"
3839 deprecated="not deprecated">
3840 <method name="through"
3841 abstract="false" native="false" synchronized="false"
3842 static="false" final="false" visibility="public"
3843 deprecated="not deprecated">
3844 <param name="filterKey" type="java.lang.Class&lt;? extends Filter&gt;"/>
3845 </method>
3846 <method name="through"
3847 abstract="false" native="false" synchronized="false"
3848 static="false" final="false" visibility="public"
3849 deprecated="not deprecated">
3850 <param name="filterKey" type="com.google.inject.Key&lt;? extends Filter&gt;"/>
3851 </method>
3852 <method name="through"
3853 abstract="false" native="false" synchronized="false"
3854 static="false" final="false" visibility="public"
3855 deprecated="not deprecated">
3856 <param name="dummyFilterClass" type="java.lang.Class&lt;? extends Filter&gt;"/>
3857 <param name="contextParams" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;"/>
3858 </method>
3859 <method name="through"
3860 abstract="false" native="false" synchronized="false"
3861 static="false" final="false" visibility="public"
3862 deprecated="not deprecated">
3863 <param name="dummyFilterClass" type="com.google.inject.Key&lt;? extends Filter&gt;"/>
3864 <param name="contextParams" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;"/>
3865 </method>
3866 <doc>
3867 <![CDATA[See the EDSL examples at {@link ServletModule#configureServlets()}
3868
3869 @since 2.0]]>
3870 </doc>
3871 </interface>
3872 <!-- end interface com.google.inject.servlet.ServletModule.FilterKeyBindingBuilder -->
3873 <!-- start interface com.google.inject.servlet.ServletModule.ServletKeyBindingBuilder -->
3874 <interface name="ServletModule.ServletKeyBindingBuilder" abstract="true"
3875 static="true" final="false" visibility="public"
3876 deprecated="not deprecated">
3877 <method name="with"
3878 abstract="false" native="false" synchronized="false"
3879 static="false" final="false" visibility="public"
3880 deprecated="not deprecated">
3881 <param name="servletKey" type="java.lang.Class&lt;? extends HttpServlet&gt;"/>
3882 </method>
3883 <method name="with"
3884 abstract="false" native="false" synchronized="false"
3885 static="false" final="false" visibility="public"
3886 deprecated="not deprecated">
3887 <param name="servletKey" type="com.google.inject.Key&lt;? extends HttpServlet&gt;"/>
3888 </method>
3889 <method name="with"
3890 abstract="false" native="false" synchronized="false"
3891 static="false" final="false" visibility="public"
3892 deprecated="not deprecated">
3893 <param name="servletKey" type="java.lang.Class&lt;? extends HttpServlet&gt;"/>
3894 <param name="contextParams" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;"/>
3895 </method>
3896 <method name="with"
3897 abstract="false" native="false" synchronized="false"
3898 static="false" final="false" visibility="public"
3899 deprecated="not deprecated">
3900 <param name="servletKey" type="com.google.inject.Key&lt;? extends HttpServlet&gt;"/>
3901 <param name="contextParams" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;"/>
3902 </method>
3903 <doc>
3904 <![CDATA[See the EDSL examples at {@link ServletModule#configureServlets()}
3905
3906 @since 2.0]]>
3907 </doc>
3908 </interface>
3909 <!-- end interface com.google.inject.servlet.ServletModule.ServletKeyBindingBuilder -->
3910 <!-- start class com.google.inject.servlet.ServletScopes -->
3911 <class name="ServletScopes" extends="java.lang.Object"
3912 abstract="false"
3913 static="false" final="false" visibility="public"
3914 deprecated="not deprecated">
3915 <field name="REQUEST" type="com.google.inject.Scope"
3916 transient="false" volatile="false"
3917 static="true" final="true" visibility="public"
3918 deprecated="not deprecated">
3919 <doc>
3920 <![CDATA[HTTP servlet request scope.]]>
3921 </doc>
3922 </field>
3923 <field name="SESSION" type="com.google.inject.Scope"
3924 transient="false" volatile="false"
3925 static="true" final="true" visibility="public"
3926 deprecated="not deprecated">
3927 <doc>
3928 <![CDATA[HTTP session scope.]]>
3929 </doc>
3930 </field>
3931 <doc>
3932 <![CDATA[Servlet scopes.
3933
3934 @author crazybob@google.com (Bob Lee)]]>
3935 </doc>
3936 </class>
3937 <!-- end class com.google.inject.servlet.ServletScopes -->
3938 <!-- start class com.google.inject.servlet.SessionScoped -->
3939 <class name="SessionScoped" abstract="true"
3940 static="false" final="false" visibility="public"
3941 deprecated="not deprecated">
3942 <implements name="java.lang.annotation.Annotation"/>
3943 <doc>
3944 <![CDATA[Apply this to implementation classes when you want one instance per session.
3945
3946 @see com.google.inject.Scopes#SINGLETON
3947 @author crazybob@google.com (Bob Lee)]]>
3948 </doc>
3949 </class>
3950 <!-- end class com.google.inject.servlet.SessionScoped -->
3951</package>
3952<package name="com.google.inject.spi">
3953 <!-- start interface com.google.inject.spi.BindingScopingVisitor -->
3954 <interface name="BindingScopingVisitor" abstract="true"
3955 static="false" final="false" visibility="public"
3956 deprecated="not deprecated">
3957 <method name="visitEagerSingleton" return="V"
3958 abstract="false" native="false" synchronized="false"
3959 static="false" final="false" visibility="public"
3960 deprecated="not deprecated">
3961 <doc>
3962 <![CDATA[Visit an eager singleton or single instance. This scope strategy is found on both module and
3963 injector bindings.]]>
3964 </doc>
3965 </method>
3966 <method name="visitScope" return="V"
3967 abstract="false" native="false" synchronized="false"
3968 static="false" final="false" visibility="public"
3969 deprecated="not deprecated">
3970 <param name="scope" type="com.google.inject.Scope"/>
3971 <doc>
3972 <![CDATA[Visit a scope instance. This scope strategy is found on both module and injector bindings.]]>
3973 </doc>
3974 </method>
3975 <method name="visitScopeAnnotation" return="V"
3976 abstract="false" native="false" synchronized="false"
3977 static="false" final="false" visibility="public"
3978 deprecated="not deprecated">
3979 <param name="scopeAnnotation" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
3980 <doc>
3981 <![CDATA[Visit a scope annotation. This scope strategy is found only on module bindings. The instance
3982 that implements this scope is registered by {@link com.google.inject.Binder#bindScope(Class,
3983 Scope) Binder.bindScope()}.]]>
3984 </doc>
3985 </method>
3986 <method name="visitNoScoping" return="V"
3987 abstract="false" native="false" synchronized="false"
3988 static="false" final="false" visibility="public"
3989 deprecated="not deprecated">
3990 <doc>
3991 <![CDATA[Visit an unspecified or unscoped strategy. On a module, this strategy indicates that the
3992 injector should use scoping annotations to find a scope. On an injector, it indicates that
3993 no scope is applied to the binding. An unscoped binding will behave like a scoped one when it
3994 is linked to a scoped binding.]]>
3995 </doc>
3996 </method>
3997 <doc>
3998 <![CDATA[Visits each of the strategies used to scope an injection.
3999
4000 @param <V> any type to be returned by the visit method. Use {@link Void} with
4001 {@code return null} if no return type is needed.
4002 @since 2.0]]>
4003 </doc>
4004 </interface>
4005 <!-- end interface com.google.inject.spi.BindingScopingVisitor -->
4006 <!-- start interface com.google.inject.spi.BindingTargetVisitor -->
4007 <interface name="BindingTargetVisitor" abstract="true"
4008 static="false" final="false" visibility="public"
4009 deprecated="not deprecated">
4010 <method name="visit" return="V"
4011 abstract="false" native="false" synchronized="false"
4012 static="false" final="false" visibility="public"
4013 deprecated="not deprecated">
4014 <param name="binding" type="com.google.inject.spi.InstanceBinding&lt;? extends T&gt;"/>
4015 <doc>
4016 <![CDATA[Visit a instance binding. The same instance is returned for every injection. This target is
4017 found in both module and injector bindings.]]>
4018 </doc>
4019 </method>
4020 <method name="visit" return="V"
4021 abstract="false" native="false" synchronized="false"
4022 static="false" final="false" visibility="public"
4023 deprecated="not deprecated">
4024 <param name="binding" type="com.google.inject.spi.ProviderInstanceBinding&lt;? extends T&gt;"/>
4025 <doc>
4026 <![CDATA[Visit a provider instance binding. The provider's {@code get} method is invoked to resolve
4027 injections. This target is found in both module and injector bindings.]]>
4028 </doc>
4029 </method>
4030 <method name="visit" return="V"
4031 abstract="false" native="false" synchronized="false"
4032 static="false" final="false" visibility="public"
4033 deprecated="not deprecated">
4034 <param name="binding" type="com.google.inject.spi.ProviderKeyBinding&lt;? extends T&gt;"/>
4035 <doc>
4036 <![CDATA[Visit a provider key binding. To resolve injections, the provider key is first resolved, then
4037 that provider's {@code get} method is invoked. This target is found in both module and injector
4038 bindings.]]>
4039 </doc>
4040 </method>
4041 <method name="visit" return="V"
4042 abstract="false" native="false" synchronized="false"
4043 static="false" final="false" visibility="public"
4044 deprecated="not deprecated">
4045 <param name="binding" type="com.google.inject.spi.LinkedKeyBinding&lt;? extends T&gt;"/>
4046 <doc>
4047 <![CDATA[Visit a linked key binding. The other key's binding is used to resolve injections. This
4048 target is found in both module and injector bindings.]]>
4049 </doc>
4050 </method>
4051 <method name="visit" return="V"
4052 abstract="false" native="false" synchronized="false"
4053 static="false" final="false" visibility="public"
4054 deprecated="not deprecated">
4055 <param name="binding" type="com.google.inject.spi.ExposedBinding&lt;? extends T&gt;"/>
4056 <doc>
4057 <![CDATA[Visit a binding to a key exposed from an enclosed private environment. This target is only
4058 found in injector bindings.]]>
4059 </doc>
4060 </method>
4061 <method name="visit" return="V"
4062 abstract="false" native="false" synchronized="false"
4063 static="false" final="false" visibility="public"
4064 deprecated="not deprecated">
4065 <param name="binding" type="com.google.inject.spi.UntargettedBinding&lt;? extends T&gt;"/>
4066 <doc>
4067 <![CDATA[Visit an untargetted binding. This target is found only on module bindings. It indicates
4068 that the injector should use its implicit binding strategies to resolve injections.]]>
4069 </doc>
4070 </method>
4071 <method name="visit" return="V"
4072 abstract="false" native="false" synchronized="false"
4073 static="false" final="false" visibility="public"
4074 deprecated="not deprecated">
4075 <param name="binding" type="com.google.inject.spi.ConstructorBinding&lt;? extends T&gt;"/>
4076 <doc>
4077 <![CDATA[Visit a constructor binding. To resolve injections, an instance is instantiated by invoking
4078 {@code constructor}. This target is found only on injector bindings.]]>
4079 </doc>
4080 </method>
4081 <method name="visit" return="V"
4082 abstract="false" native="false" synchronized="false"
4083 static="false" final="false" visibility="public"
4084 deprecated="not deprecated">
4085 <param name="binding" type="com.google.inject.spi.ConvertedConstantBinding&lt;? extends T&gt;"/>
4086 <doc>
4087 <![CDATA[Visit a binding created from converting a bound instance to a new type. The source binding
4088 has the same binding annotation but a different type. This target is found only on injector
4089 bindings.]]>
4090 </doc>
4091 </method>
4092 <method name="visit" return="V"
4093 abstract="false" native="false" synchronized="false"
4094 static="false" final="false" visibility="public"
4095 deprecated="not deprecated">
4096 <param name="binding" type="com.google.inject.spi.ProviderBinding&lt;? extends T&gt;"/>
4097 <doc>
4098 <![CDATA[Visit a binding to a {@link com.google.inject.Provider} that delegates to the binding for the
4099 provided type. This target is found only on injector bindings.]]>
4100 </doc>
4101 </method>
4102 <doc>
4103 <![CDATA[Visits each of the strategies used to find an instance to satisfy an injection.
4104
4105 @param <V> any type to be returned by the visit method. Use {@link Void} with
4106 {@code return null} if no return type is needed.
4107 @since 2.0]]>
4108 </doc>
4109 </interface>
4110 <!-- end interface com.google.inject.spi.BindingTargetVisitor -->
4111 <!-- start interface com.google.inject.spi.ConstructorBinding -->
4112 <interface name="ConstructorBinding" abstract="true"
4113 static="false" final="false" visibility="public"
4114 deprecated="not deprecated">
4115 <implements name="com.google.inject.Binding&lt;T&gt;"/>
4116 <implements name="com.google.inject.spi.HasDependencies"/>
4117 <method name="getConstructor" return="com.google.inject.spi.InjectionPoint"
4118 abstract="false" native="false" synchronized="false"
4119 static="false" final="false" visibility="public"
4120 deprecated="not deprecated">
4121 <doc>
4122 <![CDATA[Gets the constructor this binding injects.]]>
4123 </doc>
4124 </method>
4125 <method name="getInjectableMembers" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
4126 abstract="false" native="false" synchronized="false"
4127 static="false" final="false" visibility="public"
4128 deprecated="not deprecated">
4129 <doc>
4130 <![CDATA[Returns all instance method and field injection points on {@code type}.
4131
4132 @return a possibly empty set of injection points. The set has a specified iteration order. All
4133 fields are returned and then all methods. Within the fields, supertype fields are returned
4134 before subtype fields. Similarly, supertype methods are returned before subtype methods.]]>
4135 </doc>
4136 </method>
4137 <method name="getMethodInterceptors" return="java.util.Map&lt;java.lang.reflect.Method, java.util.List&lt;org.aopalliance.intercept.MethodInterceptor&gt;&gt;"
4138 abstract="false" native="false" synchronized="false"
4139 static="false" final="false" visibility="public"
4140 deprecated="not deprecated">
4141 <doc>
4142 <![CDATA[Returns the interceptors applied to each method, in the order that they will be applied.
4143
4144 @return a possibly empty map]]>
4145 </doc>
4146 </method>
4147 <doc>
4148 <![CDATA[A binding to the constructor of a concrete clss. To resolve injections, an instance is
4149 instantiated by invoking the constructor.
4150
4151 @author jessewilson@google.com (Jesse Wilson)
4152 @since 2.0]]>
4153 </doc>
4154 </interface>
4155 <!-- end interface com.google.inject.spi.ConstructorBinding -->
4156 <!-- start interface com.google.inject.spi.ConvertedConstantBinding -->
4157 <interface name="ConvertedConstantBinding" abstract="true"
4158 static="false" final="false" visibility="public"
4159 deprecated="not deprecated">
4160 <implements name="com.google.inject.Binding&lt;T&gt;"/>
4161 <implements name="com.google.inject.spi.HasDependencies"/>
4162 <method name="getValue" return="T"
4163 abstract="false" native="false" synchronized="false"
4164 static="false" final="false" visibility="public"
4165 deprecated="not deprecated">
4166 <doc>
4167 <![CDATA[Returns the converted value.]]>
4168 </doc>
4169 </method>
4170 <method name="getSourceKey" return="com.google.inject.Key&lt;java.lang.String&gt;"
4171 abstract="false" native="false" synchronized="false"
4172 static="false" final="false" visibility="public"
4173 deprecated="not deprecated">
4174 <doc>
4175 <![CDATA[Returns the key for the source binding. That binding can e retrieved from an injector using
4176 {@link com.google.inject.Injector#getBinding(Key) Injector.getBinding(key)}.]]>
4177 </doc>
4178 </method>
4179 <method name="getDependencies" return="java.util.Set&lt;com.google.inject.spi.Dependency&lt;?&gt;&gt;"
4180 abstract="false" native="false" synchronized="false"
4181 static="false" final="false" visibility="public"
4182 deprecated="not deprecated">
4183 <doc>
4184 <![CDATA[Returns a singleton set containing only the converted key.]]>
4185 </doc>
4186 </method>
4187 <doc>
4188 <![CDATA[A binding created from converting a bound instance to a new type. The source binding has the same
4189 binding annotation but a different type.
4190
4191 @author jessewilson@google.com (Jesse Wilson)
4192 @since 2.0]]>
4193 </doc>
4194 </interface>
4195 <!-- end interface com.google.inject.spi.ConvertedConstantBinding -->
4196 <!-- start class com.google.inject.spi.DefaultBindingScopingVisitor -->
4197 <class name="DefaultBindingScopingVisitor" extends="java.lang.Object"
4198 abstract="false"
4199 static="false" final="false" visibility="public"
4200 deprecated="not deprecated">
4201 <implements name="com.google.inject.spi.BindingScopingVisitor&lt;V&gt;"/>
4202 <constructor name="DefaultBindingScopingVisitor"
4203 static="false" final="false" visibility="public"
4204 deprecated="not deprecated">
4205 </constructor>
4206 <method name="visitOther" return="V"
4207 abstract="false" native="false" synchronized="false"
4208 static="false" final="false" visibility="protected"
4209 deprecated="not deprecated">
4210 <doc>
4211 <![CDATA[Default visit implementation. Returns {@code null}.]]>
4212 </doc>
4213 </method>
4214 <method name="visitEagerSingleton" return="V"
4215 abstract="false" native="false" synchronized="false"
4216 static="false" final="false" visibility="public"
4217 deprecated="not deprecated">
4218 </method>
4219 <method name="visitScope" return="V"
4220 abstract="false" native="false" synchronized="false"
4221 static="false" final="false" visibility="public"
4222 deprecated="not deprecated">
4223 <param name="scope" type="com.google.inject.Scope"/>
4224 </method>
4225 <method name="visitScopeAnnotation" return="V"
4226 abstract="false" native="false" synchronized="false"
4227 static="false" final="false" visibility="public"
4228 deprecated="not deprecated">
4229 <param name="scopeAnnotation" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
4230 </method>
4231 <method name="visitNoScoping" return="V"
4232 abstract="false" native="false" synchronized="false"
4233 static="false" final="false" visibility="public"
4234 deprecated="not deprecated">
4235 </method>
4236 <doc>
4237 <![CDATA[No-op visitor for subclassing. All interface methods simply delegate to
4238 {@link #visitOther()}, returning its result.
4239
4240 @param <V> any type to be returned by the visit method. Use {@link Void} with
4241 {@code return null} if no return type is needed.
4242
4243 @author jessewilson@google.com (Jesse Wilson)
4244 @since 2.0]]>
4245 </doc>
4246 </class>
4247 <!-- end class com.google.inject.spi.DefaultBindingScopingVisitor -->
4248 <!-- start class com.google.inject.spi.DefaultBindingTargetVisitor -->
4249 <class name="DefaultBindingTargetVisitor" extends="java.lang.Object"
4250 abstract="true"
4251 static="false" final="false" visibility="public"
4252 deprecated="not deprecated">
4253 <implements name="com.google.inject.spi.BindingTargetVisitor&lt;T, V&gt;"/>
4254 <constructor name="DefaultBindingTargetVisitor"
4255 static="false" final="false" visibility="public"
4256 deprecated="not deprecated">
4257 </constructor>
4258 <method name="visitOther" return="V"
4259 abstract="false" native="false" synchronized="false"
4260 static="false" final="false" visibility="protected"
4261 deprecated="not deprecated">
4262 <param name="binding" type="com.google.inject.Binding&lt;? extends T&gt;"/>
4263 <doc>
4264 <![CDATA[Default visit implementation. Returns {@code null}.]]>
4265 </doc>
4266 </method>
4267 <method name="visit" return="V"
4268 abstract="false" native="false" synchronized="false"
4269 static="false" final="false" visibility="public"
4270 deprecated="not deprecated">
4271 <param name="instanceBinding" type="com.google.inject.spi.InstanceBinding&lt;? extends T&gt;"/>
4272 </method>
4273 <method name="visit" return="V"
4274 abstract="false" native="false" synchronized="false"
4275 static="false" final="false" visibility="public"
4276 deprecated="not deprecated">
4277 <param name="providerInstanceBinding" type="com.google.inject.spi.ProviderInstanceBinding&lt;? extends T&gt;"/>
4278 </method>
4279 <method name="visit" return="V"
4280 abstract="false" native="false" synchronized="false"
4281 static="false" final="false" visibility="public"
4282 deprecated="not deprecated">
4283 <param name="providerKeyBinding" type="com.google.inject.spi.ProviderKeyBinding&lt;? extends T&gt;"/>
4284 </method>
4285 <method name="visit" return="V"
4286 abstract="false" native="false" synchronized="false"
4287 static="false" final="false" visibility="public"
4288 deprecated="not deprecated">
4289 <param name="linkedKeyBinding" type="com.google.inject.spi.LinkedKeyBinding&lt;? extends T&gt;"/>
4290 </method>
4291 <method name="visit" return="V"
4292 abstract="false" native="false" synchronized="false"
4293 static="false" final="false" visibility="public"
4294 deprecated="not deprecated">
4295 <param name="exposedBinding" type="com.google.inject.spi.ExposedBinding&lt;? extends T&gt;"/>
4296 </method>
4297 <method name="visit" return="V"
4298 abstract="false" native="false" synchronized="false"
4299 static="false" final="false" visibility="public"
4300 deprecated="not deprecated">
4301 <param name="untargettedBinding" type="com.google.inject.spi.UntargettedBinding&lt;? extends T&gt;"/>
4302 </method>
4303 <method name="visit" return="V"
4304 abstract="false" native="false" synchronized="false"
4305 static="false" final="false" visibility="public"
4306 deprecated="not deprecated">
4307 <param name="constructorBinding" type="com.google.inject.spi.ConstructorBinding&lt;? extends T&gt;"/>
4308 </method>
4309 <method name="visit" return="V"
4310 abstract="false" native="false" synchronized="false"
4311 static="false" final="false" visibility="public"
4312 deprecated="not deprecated">
4313 <param name="convertedConstantBinding" type="com.google.inject.spi.ConvertedConstantBinding&lt;? extends T&gt;"/>
4314 </method>
4315 <method name="visit" return="V"
4316 abstract="false" native="false" synchronized="false"
4317 static="false" final="false" visibility="public"
4318 deprecated="not deprecated">
4319 <param name="providerBinding" type="com.google.inject.spi.ProviderBinding&lt;? extends T&gt;"/>
4320 </method>
4321 <doc>
4322 <![CDATA[No-op visitor for subclassing. All interface methods simply delegate to {@link
4323 #visitOther(Binding)}, returning its result.
4324
4325 @param <V> any type to be returned by the visit method. Use {@link Void} with
4326 {@code return null} if no return type is needed.
4327
4328 @author jessewilson@google.com (Jesse Wilson)
4329 @since 2.0]]>
4330 </doc>
4331 </class>
4332 <!-- end class com.google.inject.spi.DefaultBindingTargetVisitor -->
4333 <!-- start class com.google.inject.spi.DefaultElementVisitor -->
4334 <class name="DefaultElementVisitor" extends="java.lang.Object"
4335 abstract="true"
4336 static="false" final="false" visibility="public"
4337 deprecated="not deprecated">
4338 <implements name="com.google.inject.spi.ElementVisitor&lt;V&gt;"/>
4339 <constructor name="DefaultElementVisitor"
4340 static="false" final="false" visibility="public"
4341 deprecated="not deprecated">
4342 </constructor>
4343 <method name="visitOther" return="V"
4344 abstract="false" native="false" synchronized="false"
4345 static="false" final="false" visibility="protected"
4346 deprecated="not deprecated">
4347 <param name="element" type="com.google.inject.spi.Element"/>
4348 <doc>
4349 <![CDATA[Default visit implementation. Returns {@code null}.]]>
4350 </doc>
4351 </method>
4352 <method name="visit" return="V"
4353 abstract="false" native="false" synchronized="false"
4354 static="false" final="false" visibility="public"
4355 deprecated="not deprecated">
4356 <param name="message" type="com.google.inject.spi.Message"/>
4357 </method>
4358 <method name="visit" return="V"
4359 abstract="false" native="false" synchronized="false"
4360 static="false" final="false" visibility="public"
4361 deprecated="not deprecated">
4362 <param name="binding" type="com.google.inject.Binding&lt;T&gt;"/>
4363 </method>
4364 <method name="visit" return="V"
4365 abstract="false" native="false" synchronized="false"
4366 static="false" final="false" visibility="public"
4367 deprecated="not deprecated">
4368 <param name="interceptorBinding" type="com.google.inject.spi.InterceptorBinding"/>
4369 </method>
4370 <method name="visit" return="V"
4371 abstract="false" native="false" synchronized="false"
4372 static="false" final="false" visibility="public"
4373 deprecated="not deprecated">
4374 <param name="scopeBinding" type="com.google.inject.spi.ScopeBinding"/>
4375 </method>
4376 <method name="visit" return="V"
4377 abstract="false" native="false" synchronized="false"
4378 static="false" final="false" visibility="public"
4379 deprecated="not deprecated">
4380 <param name="typeConverterBinding" type="com.google.inject.spi.TypeConverterBinding"/>
4381 </method>
4382 <method name="visit" return="V"
4383 abstract="false" native="false" synchronized="false"
4384 static="false" final="false" visibility="public"
4385 deprecated="not deprecated">
4386 <param name="providerLookup" type="com.google.inject.spi.ProviderLookup&lt;T&gt;"/>
4387 </method>
4388 <method name="visit" return="V"
4389 abstract="false" native="false" synchronized="false"
4390 static="false" final="false" visibility="public"
4391 deprecated="not deprecated">
4392 <param name="injectionRequest" type="com.google.inject.spi.InjectionRequest"/>
4393 </method>
4394 <method name="visit" return="V"
4395 abstract="false" native="false" synchronized="false"
4396 static="false" final="false" visibility="public"
4397 deprecated="not deprecated">
4398 <param name="staticInjectionRequest" type="com.google.inject.spi.StaticInjectionRequest"/>
4399 </method>
4400 <method name="visit" return="V"
4401 abstract="false" native="false" synchronized="false"
4402 static="false" final="false" visibility="public"
4403 deprecated="not deprecated">
4404 <param name="privateElements" type="com.google.inject.spi.PrivateElements"/>
4405 </method>
4406 <method name="visit" return="V"
4407 abstract="false" native="false" synchronized="false"
4408 static="false" final="false" visibility="public"
4409 deprecated="not deprecated">
4410 <param name="lookup" type="com.google.inject.spi.MembersInjectorLookup&lt;T&gt;"/>
4411 </method>
4412 <method name="visit" return="V"
4413 abstract="false" native="false" synchronized="false"
4414 static="false" final="false" visibility="public"
4415 deprecated="not deprecated">
4416 <param name="binding" type="com.google.inject.spi.TypeListenerBinding"/>
4417 </method>
4418 <doc>
4419 <![CDATA[No-op visitor for subclassing. All interface methods simply delegate to
4420 {@link #visitOther(Element)}, returning its result.
4421
4422 @param <V> any type to be returned by the visit method. Use {@link Void} with
4423 {@code return null} if no return type is needed.
4424
4425 @author sberlin@gmail.com (Sam Berlin)
4426 @since 2.0]]>
4427 </doc>
4428 </class>
4429 <!-- end class com.google.inject.spi.DefaultElementVisitor -->
4430 <!-- start class com.google.inject.spi.Dependency -->
4431 <class name="Dependency" extends="java.lang.Object"
4432 abstract="false"
4433 static="false" final="true" visibility="public"
4434 deprecated="not deprecated">
4435 <method name="get" return="com.google.inject.spi.Dependency&lt;T&gt;"
4436 abstract="false" native="false" synchronized="false"
4437 static="true" final="false" visibility="public"
4438 deprecated="not deprecated">
4439 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
4440 <doc>
4441 <![CDATA[Returns a new dependency that is not attached to an injection point. The returned dependency is
4442 nullable.]]>
4443 </doc>
4444 </method>
4445 <method name="forInjectionPoints" return="java.util.Set&lt;com.google.inject.spi.Dependency&lt;?&gt;&gt;"
4446 abstract="false" native="false" synchronized="false"
4447 static="true" final="false" visibility="public"
4448 deprecated="not deprecated">
4449 <param name="injectionPoints" type="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"/>
4450 <doc>
4451 <![CDATA[Returns the dependencies from the given injection points.]]>
4452 </doc>
4453 </method>
4454 <method name="getKey" return="com.google.inject.Key&lt;T&gt;"
4455 abstract="false" native="false" synchronized="false"
4456 static="false" final="false" visibility="public"
4457 deprecated="not deprecated">
4458 <doc>
4459 <![CDATA[Returns the key to the binding that satisfies this dependency.]]>
4460 </doc>
4461 </method>
4462 <method name="isNullable" return="boolean"
4463 abstract="false" native="false" synchronized="false"
4464 static="false" final="false" visibility="public"
4465 deprecated="not deprecated">
4466 <doc>
4467 <![CDATA[Returns true if null is a legal value for this dependency.]]>
4468 </doc>
4469 </method>
4470 <method name="getInjectionPoint" return="com.google.inject.spi.InjectionPoint"
4471 abstract="false" native="false" synchronized="false"
4472 static="false" final="false" visibility="public"
4473 deprecated="not deprecated">
4474 <doc>
4475 <![CDATA[Returns the injection point to which this dependency belongs, or null if this dependency isn't
4476 attached to a particular injection point.]]>
4477 </doc>
4478 </method>
4479 <method name="getParameterIndex" return="int"
4480 abstract="false" native="false" synchronized="false"
4481 static="false" final="false" visibility="public"
4482 deprecated="not deprecated">
4483 <doc>
4484 <![CDATA[Returns the index of this dependency in the injection point's parameter list, or {@code -1} if
4485 this dependency does not belong to a parameter list. Only method and constuctor dependencies
4486 are elements in a parameter list.]]>
4487 </doc>
4488 </method>
4489 <method name="hashCode" return="int"
4490 abstract="false" native="false" synchronized="false"
4491 static="false" final="false" visibility="public"
4492 deprecated="not deprecated">
4493 </method>
4494 <method name="equals" return="boolean"
4495 abstract="false" native="false" synchronized="false"
4496 static="false" final="false" visibility="public"
4497 deprecated="not deprecated">
4498 <param name="o" type="java.lang.Object"/>
4499 </method>
4500 <method name="toString" return="java.lang.String"
4501 abstract="false" native="false" synchronized="false"
4502 static="false" final="false" visibility="public"
4503 deprecated="not deprecated">
4504 </method>
4505 <doc>
4506 <![CDATA[A variable that can be resolved by an injector.
4507
4508 <p>Use {@link #get} to build a freestanding dependency, or {@link InjectionPoint} to build one
4509 that's attached to a constructor, method or field.
4510
4511 @author crazybob@google.com (Bob Lee)
4512 @author jessewilson@google.com (Jesse Wilson)
4513 @since 2.0]]>
4514 </doc>
4515 </class>
4516 <!-- end class com.google.inject.spi.Dependency -->
4517 <!-- start interface com.google.inject.spi.Element -->
4518 <interface name="Element" abstract="true"
4519 static="false" final="false" visibility="public"
4520 deprecated="not deprecated">
4521 <method name="getSource" return="java.lang.Object"
4522 abstract="false" native="false" synchronized="false"
4523 static="false" final="false" visibility="public"
4524 deprecated="not deprecated">
4525 <doc>
4526 <![CDATA[Returns an arbitrary object containing information about the "place" where this element was
4527 configured. Used by Guice in the production of descriptive error messages.
4528
4529 <p>Tools might specially handle types they know about; {@code StackTraceElement} is a good
4530 example. Tools should simply call {@code toString()} on the source object if the type is
4531 unfamiliar.]]>
4532 </doc>
4533 </method>
4534 <method name="acceptVisitor" return="T"
4535 abstract="false" native="false" synchronized="false"
4536 static="false" final="false" visibility="public"
4537 deprecated="not deprecated">
4538 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
4539 <doc>
4540 <![CDATA[Accepts an element visitor. Invokes the visitor method specific to this element's type.
4541
4542 @param visitor to call back on]]>
4543 </doc>
4544 </method>
4545 <method name="applyTo"
4546 abstract="false" native="false" synchronized="false"
4547 static="false" final="false" visibility="public"
4548 deprecated="not deprecated">
4549 <param name="binder" type="com.google.inject.Binder"/>
4550 <doc>
4551 <![CDATA[Writes this module element to the given binder (optional operation).
4552
4553 @param binder to apply configuration element to
4554 @throws UnsupportedOperationException if the {@code applyTo} method is not supported by this
4555 element.]]>
4556 </doc>
4557 </method>
4558 <doc>
4559 <![CDATA[A core component of a module or injector.
4560
4561 <p>The elements of a module can be inspected, validated and rewritten. Use {@link
4562 Elements#getElements(com.google.inject.Module[]) Elements.getElements()} to read the elements
4563 from a module, and {@link Elements#getModule(Iterable) Elements.getModule()} to rewrite them.
4564 This can be used for static analysis and generation of Guice modules.
4565
4566 <p>The elements of an injector can be inspected and exercised. Use {@link
4567 com.google.inject.Injector#getBindings Injector.getBindings()} to reflect on Guice injectors.
4568
4569 @author jessewilson@google.com (Jesse Wilson)
4570 @author crazybob@google.com (Bob Lee)
4571 @since 2.0]]>
4572 </doc>
4573 </interface>
4574 <!-- end interface com.google.inject.spi.Element -->
4575 <!-- start class com.google.inject.spi.Elements -->
4576 <class name="Elements" extends="java.lang.Object"
4577 abstract="false"
4578 static="false" final="true" visibility="public"
4579 deprecated="not deprecated">
4580 <constructor name="Elements"
4581 static="false" final="false" visibility="public"
4582 deprecated="not deprecated">
4583 </constructor>
4584 <method name="getElements" return="java.util.List&lt;com.google.inject.spi.Element&gt;"
4585 abstract="false" native="false" synchronized="false"
4586 static="true" final="false" visibility="public"
4587 deprecated="not deprecated">
4588 <param name="modules" type="com.google.inject.Module[]"/>
4589 <doc>
4590 <![CDATA[Records the elements executed by {@code modules}.]]>
4591 </doc>
4592 </method>
4593 <method name="getElements" return="java.util.List&lt;com.google.inject.spi.Element&gt;"
4594 abstract="false" native="false" synchronized="false"
4595 static="true" final="false" visibility="public"
4596 deprecated="not deprecated">
4597 <param name="stage" type="com.google.inject.Stage"/>
4598 <param name="modules" type="com.google.inject.Module[]"/>
4599 <doc>
4600 <![CDATA[Records the elements executed by {@code modules}.]]>
4601 </doc>
4602 </method>
4603 <method name="getElements" return="java.util.List&lt;com.google.inject.spi.Element&gt;"
4604 abstract="false" native="false" synchronized="false"
4605 static="true" final="false" visibility="public"
4606 deprecated="not deprecated">
4607 <param name="modules" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
4608 <doc>
4609 <![CDATA[Records the elements executed by {@code modules}.]]>
4610 </doc>
4611 </method>
4612 <method name="getElements" return="java.util.List&lt;com.google.inject.spi.Element&gt;"
4613 abstract="false" native="false" synchronized="false"
4614 static="true" final="false" visibility="public"
4615 deprecated="not deprecated">
4616 <param name="stage" type="com.google.inject.Stage"/>
4617 <param name="modules" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
4618 <doc>
4619 <![CDATA[Records the elements executed by {@code modules}.]]>
4620 </doc>
4621 </method>
4622 <method name="getModule" return="com.google.inject.Module"
4623 abstract="false" native="false" synchronized="false"
4624 static="true" final="false" visibility="public"
4625 deprecated="not deprecated">
4626 <param name="elements" type="java.lang.Iterable&lt;? extends com.google.inject.spi.Element&gt;"/>
4627 <doc>
4628 <![CDATA[Returns the module composed of {@code elements}.]]>
4629 </doc>
4630 </method>
4631 <doc>
4632 <![CDATA[Exposes elements of a module so they can be inspected, validated or {@link
4633 Element#applyTo(Binder) rewritten}.
4634
4635 @author jessewilson@google.com (Jesse Wilson)
4636 @since 2.0]]>
4637 </doc>
4638 </class>
4639 <!-- end class com.google.inject.spi.Elements -->
4640 <!-- start interface com.google.inject.spi.ElementVisitor -->
4641 <interface name="ElementVisitor" abstract="true"
4642 static="false" final="false" visibility="public"
4643 deprecated="not deprecated">
4644 <method name="visit" return="V"
4645 abstract="false" native="false" synchronized="false"
4646 static="false" final="false" visibility="public"
4647 deprecated="not deprecated">
4648 <param name="binding" type="com.google.inject.Binding&lt;T&gt;"/>
4649 <doc>
4650 <![CDATA[Visit a mapping from a key (type and optional annotation) to the strategy for getting
4651 instances of the type.]]>
4652 </doc>
4653 </method>
4654 <method name="visit" return="V"
4655 abstract="false" native="false" synchronized="false"
4656 static="false" final="false" visibility="public"
4657 deprecated="not deprecated">
4658 <param name="binding" type="com.google.inject.spi.InterceptorBinding"/>
4659 <doc>
4660 <![CDATA[Visit a registration of interceptors for matching methods of matching classes.]]>
4661 </doc>
4662 </method>
4663 <method name="visit" return="V"
4664 abstract="false" native="false" synchronized="false"
4665 static="false" final="false" visibility="public"
4666 deprecated="not deprecated">
4667 <param name="binding" type="com.google.inject.spi.ScopeBinding"/>
4668 <doc>
4669 <![CDATA[Visit a registration of a scope annotation with the scope that implements it.]]>
4670 </doc>
4671 </method>
4672 <method name="visit" return="V"
4673 abstract="false" native="false" synchronized="false"
4674 static="false" final="false" visibility="public"
4675 deprecated="not deprecated">
4676 <param name="binding" type="com.google.inject.spi.TypeConverterBinding"/>
4677 <doc>
4678 <![CDATA[Visit a registration of type converters for matching target types.]]>
4679 </doc>
4680 </method>
4681 <method name="visit" return="V"
4682 abstract="false" native="false" synchronized="false"
4683 static="false" final="false" visibility="public"
4684 deprecated="not deprecated">
4685 <param name="request" type="com.google.inject.spi.InjectionRequest"/>
4686 <doc>
4687 <![CDATA[Visit a request to inject the instance fields and methods of an instance.]]>
4688 </doc>
4689 </method>
4690 <method name="visit" return="V"
4691 abstract="false" native="false" synchronized="false"
4692 static="false" final="false" visibility="public"
4693 deprecated="not deprecated">
4694 <param name="request" type="com.google.inject.spi.StaticInjectionRequest"/>
4695 <doc>
4696 <![CDATA[Visit a request to inject the static fields and methods of type.]]>
4697 </doc>
4698 </method>
4699 <method name="visit" return="V"
4700 abstract="false" native="false" synchronized="false"
4701 static="false" final="false" visibility="public"
4702 deprecated="not deprecated">
4703 <param name="lookup" type="com.google.inject.spi.ProviderLookup&lt;T&gt;"/>
4704 <doc>
4705 <![CDATA[Visit a lookup of the provider for a type.]]>
4706 </doc>
4707 </method>
4708 <method name="visit" return="V"
4709 abstract="false" native="false" synchronized="false"
4710 static="false" final="false" visibility="public"
4711 deprecated="not deprecated">
4712 <param name="lookup" type="com.google.inject.spi.MembersInjectorLookup&lt;T&gt;"/>
4713 <doc>
4714 <![CDATA[Visit a lookup of the members injector.]]>
4715 </doc>
4716 </method>
4717 <method name="visit" return="V"
4718 abstract="false" native="false" synchronized="false"
4719 static="false" final="false" visibility="public"
4720 deprecated="not deprecated">
4721 <param name="message" type="com.google.inject.spi.Message"/>
4722 <doc>
4723 <![CDATA[Visit an error message and the context in which it occured.]]>
4724 </doc>
4725 </method>
4726 <method name="visit" return="V"
4727 abstract="false" native="false" synchronized="false"
4728 static="false" final="false" visibility="public"
4729 deprecated="not deprecated">
4730 <param name="elements" type="com.google.inject.spi.PrivateElements"/>
4731 <doc>
4732 <![CDATA[Visit a collection of configuration elements for a {@linkplain com.google.inject.PrivateBinder
4733 private binder}.]]>
4734 </doc>
4735 </method>
4736 <method name="visit" return="V"
4737 abstract="false" native="false" synchronized="false"
4738 static="false" final="false" visibility="public"
4739 deprecated="not deprecated">
4740 <param name="binding" type="com.google.inject.spi.TypeListenerBinding"/>
4741 <doc>
4742 <![CDATA[Visit an injectable type listener binding.]]>
4743 </doc>
4744 </method>
4745 <doc>
4746 <![CDATA[Visit elements.
4747
4748 @param <V> any type to be returned by the visit method. Use {@link Void} with
4749 {@code return null} if no return type is needed.
4750
4751 @since 2.0]]>
4752 </doc>
4753 </interface>
4754 <!-- end interface com.google.inject.spi.ElementVisitor -->
4755 <!-- start interface com.google.inject.spi.ExposedBinding -->
4756 <interface name="ExposedBinding" abstract="true"
4757 static="false" final="false" visibility="public"
4758 deprecated="not deprecated">
4759 <implements name="com.google.inject.Binding&lt;T&gt;"/>
4760 <implements name="com.google.inject.spi.HasDependencies"/>
4761 <method name="getPrivateElements" return="com.google.inject.spi.PrivateElements"
4762 abstract="false" native="false" synchronized="false"
4763 static="false" final="false" visibility="public"
4764 deprecated="not deprecated">
4765 <doc>
4766 <![CDATA[Returns the enclosed environment that holds the original binding.]]>
4767 </doc>
4768 </method>
4769 <method name="applyTo"
4770 abstract="false" native="false" synchronized="false"
4771 static="false" final="false" visibility="public"
4772 deprecated="not deprecated">
4773 <param name="binder" type="com.google.inject.Binder"/>
4774 <doc>
4775 <![CDATA[Unsupported. Always throws {@link UnsupportedOperationException}.]]>
4776 </doc>
4777 </method>
4778 <doc>
4779 <![CDATA[A binding to a key exposed from an enclosed private environment.
4780
4781 @author jessewilson@google.com (Jesse Wilson)
4782 @since 2.0]]>
4783 </doc>
4784 </interface>
4785 <!-- end interface com.google.inject.spi.ExposedBinding -->
4786 <!-- start interface com.google.inject.spi.HasDependencies -->
4787 <interface name="HasDependencies" abstract="true"
4788 static="false" final="false" visibility="public"
4789 deprecated="not deprecated">
4790 <method name="getDependencies" return="java.util.Set&lt;com.google.inject.spi.Dependency&lt;?&gt;&gt;"
4791 abstract="false" native="false" synchronized="false"
4792 static="false" final="false" visibility="public"
4793 deprecated="not deprecated">
4794 <doc>
4795 <![CDATA[Returns the known dependencies for this type. If this has dependencies whose values are not
4796 known statically, a dependency for the {@link com.google.inject.Injector Injector} will be
4797 included in the returned set.
4798
4799 @return a possibly empty set]]>
4800 </doc>
4801 </method>
4802 <doc>
4803 <![CDATA[Implemented by {@link com.google.inject.Binding bindings}, {@link com.google.inject.Provider
4804 providers} and instances that expose their dependencies explicitly.
4805
4806 @author jessewilson@google.com (Jesse Wilson)
4807 @since 2.0]]>
4808 </doc>
4809 </interface>
4810 <!-- end interface com.google.inject.spi.HasDependencies -->
4811 <!-- start interface com.google.inject.spi.InjectionListener -->
4812 <interface name="InjectionListener" abstract="true"
4813 static="false" final="false" visibility="public"
4814 deprecated="not deprecated">
4815 <method name="afterInjection"
4816 abstract="false" native="false" synchronized="false"
4817 static="false" final="false" visibility="public"
4818 deprecated="not deprecated">
4819 <param name="injectee" type="I"/>
4820 <doc>
4821 <![CDATA[Invoked by Guice after it injects the fields and methods of instance.
4822
4823 @param injectee instance that Guice injected dependencies into]]>
4824 </doc>
4825 </method>
4826 <doc>
4827 <![CDATA[Listens for injections into instances of type {@code I}. Useful for performing further
4828 injections, post-injection initialization, and more.
4829
4830 @author crazybob@google.com (Bob Lee)
4831 @author jessewilson@google.com (Jesse Wilson)
4832 @since 2.0]]>
4833 </doc>
4834 </interface>
4835 <!-- end interface com.google.inject.spi.InjectionListener -->
4836 <!-- start class com.google.inject.spi.InjectionPoint -->
4837 <class name="InjectionPoint" extends="java.lang.Object"
4838 abstract="false"
4839 static="false" final="true" visibility="public"
4840 deprecated="not deprecated">
4841 <method name="getMember" return="java.lang.reflect.Member"
4842 abstract="false" native="false" synchronized="false"
4843 static="false" final="false" visibility="public"
4844 deprecated="not deprecated">
4845 <doc>
4846 <![CDATA[Returns the injected constructor, field, or method.]]>
4847 </doc>
4848 </method>
4849 <method name="getDependencies" return="java.util.List&lt;com.google.inject.spi.Dependency&lt;?&gt;&gt;"
4850 abstract="false" native="false" synchronized="false"
4851 static="false" final="false" visibility="public"
4852 deprecated="not deprecated">
4853 <doc>
4854 <![CDATA[Returns the dependencies for this injection point. If the injection point is for a method or
4855 constructor, the dependencies will correspond to that member's parameters. Field injection
4856 points always have a single dependency for the field itself.
4857
4858 @return a possibly-empty list]]>
4859 </doc>
4860 </method>
4861 <method name="isOptional" return="boolean"
4862 abstract="false" native="false" synchronized="false"
4863 static="false" final="false" visibility="public"
4864 deprecated="not deprecated">
4865 <doc>
4866 <![CDATA[Returns true if this injection point shall be skipped if the injector cannot resolve bindings
4867 for all required dependencies. Both explicit bindings (as specified in a module), and implicit
4868 bindings ({@literal @}{@link com.google.inject.ImplementedBy ImplementedBy}, default
4869 constructors etc.) may be used to satisfy optional injection points.]]>
4870 </doc>
4871 </method>
4872 <method name="equals" return="boolean"
4873 abstract="false" native="false" synchronized="false"
4874 static="false" final="false" visibility="public"
4875 deprecated="not deprecated">
4876 <param name="o" type="java.lang.Object"/>
4877 </method>
4878 <method name="hashCode" return="int"
4879 abstract="false" native="false" synchronized="false"
4880 static="false" final="false" visibility="public"
4881 deprecated="not deprecated">
4882 </method>
4883 <method name="toString" return="java.lang.String"
4884 abstract="false" native="false" synchronized="false"
4885 static="false" final="false" visibility="public"
4886 deprecated="not deprecated">
4887 </method>
4888 <method name="forConstructorOf" return="com.google.inject.spi.InjectionPoint"
4889 abstract="false" native="false" synchronized="false"
4890 static="true" final="false" visibility="public"
4891 deprecated="not deprecated">
4892 <param name="type" type="com.google.inject.TypeLiteral&lt;?&gt;"/>
4893 <doc>
4894 <![CDATA[Returns a new injection point for the injectable constructor of {@code type}.
4895
4896 @param type a concrete type with exactly one constructor annotated {@literal @}{@link Inject},
4897 or a no-arguments constructor that is not private.
4898 @throws ConfigurationException if there is no injectable constructor, more than one injectable
4899 constructor, or if parameters of the injectable constructor are malformed, such as a
4900 parameter with multiple binding annotations.]]>
4901 </doc>
4902 </method>
4903 <method name="forConstructorOf" return="com.google.inject.spi.InjectionPoint"
4904 abstract="false" native="false" synchronized="false"
4905 static="true" final="false" visibility="public"
4906 deprecated="not deprecated">
4907 <param name="type" type="java.lang.Class&lt;?&gt;"/>
4908 <doc>
4909 <![CDATA[Returns a new injection point for the injectable constructor of {@code type}.
4910
4911 @param type a concrete type with exactly one constructor annotated {@literal @}{@link Inject},
4912 or a no-arguments constructor that is not private.
4913 @throws ConfigurationException if there is no injectable constructor, more than one injectable
4914 constructor, or if parameters of the injectable constructor are malformed, such as a
4915 parameter with multiple binding annotations.]]>
4916 </doc>
4917 </method>
4918 <method name="forStaticMethodsAndFields" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
4919 abstract="false" native="false" synchronized="false"
4920 static="true" final="false" visibility="public"
4921 deprecated="not deprecated">
4922 <param name="type" type="com.google.inject.TypeLiteral"/>
4923 <doc>
4924 <![CDATA[Returns all static method and field injection points on {@code type}.
4925
4926 @return a possibly empty set of injection points. The set has a specified iteration order. All
4927 fields are returned and then all methods. Within the fields, supertype fields are returned
4928 before subtype fields. Similarly, supertype methods are returned before subtype methods.
4929 @throws ConfigurationException if there is a malformed injection point on {@code type}, such as
4930 a field with multiple binding annotations. The exception's {@link
4931 ConfigurationException#getPartialValue() partial value} is a {@code Set<InjectionPoint>}
4932 of the valid injection points.]]>
4933 </doc>
4934 </method>
4935 <method name="forStaticMethodsAndFields" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
4936 abstract="false" native="false" synchronized="false"
4937 static="true" final="false" visibility="public"
4938 deprecated="not deprecated">
4939 <param name="type" type="java.lang.Class&lt;?&gt;"/>
4940 <doc>
4941 <![CDATA[Returns all static method and field injection points on {@code type}.
4942
4943 @return a possibly empty set of injection points. The set has a specified iteration order. All
4944 fields are returned and then all methods. Within the fields, supertype fields are returned
4945 before subtype fields. Similarly, supertype methods are returned before subtype methods.
4946 @throws ConfigurationException if there is a malformed injection point on {@code type}, such as
4947 a field with multiple binding annotations. The exception's {@link
4948 ConfigurationException#getPartialValue() partial value} is a {@code Set<InjectionPoint>}
4949 of the valid injection points.]]>
4950 </doc>
4951 </method>
4952 <method name="forInstanceMethodsAndFields" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
4953 abstract="false" native="false" synchronized="false"
4954 static="true" final="false" visibility="public"
4955 deprecated="not deprecated">
4956 <param name="type" type="com.google.inject.TypeLiteral&lt;?&gt;"/>
4957 <doc>
4958 <![CDATA[Returns all instance method and field injection points on {@code type}.
4959
4960 @return a possibly empty set of injection points. The set has a specified iteration order. All
4961 fields are returned and then all methods. Within the fields, supertype fields are returned
4962 before subtype fields. Similarly, supertype methods are returned before subtype methods.
4963 @throws ConfigurationException if there is a malformed injection point on {@code type}, such as
4964 a field with multiple binding annotations. The exception's {@link
4965 ConfigurationException#getPartialValue() partial value} is a {@code Set<InjectionPoint>}
4966 of the valid injection points.]]>
4967 </doc>
4968 </method>
4969 <method name="forInstanceMethodsAndFields" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
4970 abstract="false" native="false" synchronized="false"
4971 static="true" final="false" visibility="public"
4972 deprecated="not deprecated">
4973 <param name="type" type="java.lang.Class&lt;?&gt;"/>
4974 <doc>
4975 <![CDATA[Returns all instance method and field injection points on {@code type}.
4976
4977 @return a possibly empty set of injection points. The set has a specified iteration order. All
4978 fields are returned and then all methods. Within the fields, supertype fields are returned
4979 before subtype fields. Similarly, supertype methods are returned before subtype methods.
4980 @throws ConfigurationException if there is a malformed injection point on {@code type}, such as
4981 a field with multiple binding annotations. The exception's {@link
4982 ConfigurationException#getPartialValue() partial value} is a {@code Set<InjectionPoint>}
4983 of the valid injection points.]]>
4984 </doc>
4985 </method>
4986 <doc>
4987 <![CDATA[A constructor, field or method that can receive injections. Typically this is a member with the
4988 {@literal @}{@link Inject} annotation. For non-private, no argument constructors, the member may
4989 omit the annotation.
4990
4991 @author crazybob@google.com (Bob Lee)
4992 @since 2.0]]>
4993 </doc>
4994 </class>
4995 <!-- end class com.google.inject.spi.InjectionPoint -->
4996 <!-- start class com.google.inject.spi.InjectionRequest -->
4997 <class name="InjectionRequest" extends="java.lang.Object"
4998 abstract="false"
4999 static="false" final="true" visibility="public"
5000 deprecated="not deprecated">
5001 <implements name="com.google.inject.spi.Element"/>
5002 <constructor name="InjectionRequest" type="java.lang.Object, com.google.inject.TypeLiteral&lt;T&gt;, T"
5003 static="false" final="false" visibility="public"
5004 deprecated="not deprecated">
5005 </constructor>
5006 <method name="getSource" return="java.lang.Object"
5007 abstract="false" native="false" synchronized="false"
5008 static="false" final="false" visibility="public"
5009 deprecated="not deprecated">
5010 </method>
5011 <method name="getInstance" return="T"
5012 abstract="false" native="false" synchronized="false"
5013 static="false" final="false" visibility="public"
5014 deprecated="not deprecated">
5015 </method>
5016 <method name="getType" return="com.google.inject.TypeLiteral&lt;T&gt;"
5017 abstract="false" native="false" synchronized="false"
5018 static="false" final="false" visibility="public"
5019 deprecated="not deprecated">
5020 </method>
5021 <method name="getInjectionPoints" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
5022 abstract="false" native="false" synchronized="false"
5023 static="false" final="false" visibility="public"
5024 deprecated="not deprecated">
5025 <exception name="ConfigurationException" type="com.google.inject.ConfigurationException"/>
5026 <doc>
5027 <![CDATA[Returns the instance methods and fields of {@code instance} that will be injected to fulfill
5028 this request.
5029
5030 @return a possibly empty set of injection points. The set has a specified iteration order. All
5031 fields are returned and then all methods. Within the fields, supertype fields are returned
5032 before subtype fields. Similarly, supertype methods are returned before subtype methods.
5033 @throws ConfigurationException if there is a malformed injection point on the class of {@code
5034 instance}, such as a field with multiple binding annotations. The exception's {@link
5035 ConfigurationException#getPartialValue() partial value} is a {@code Set<InjectionPoint>}
5036 of the valid injection points.]]>
5037 </doc>
5038 </method>
5039 <method name="acceptVisitor" return="R"
5040 abstract="false" native="false" synchronized="false"
5041 static="false" final="false" visibility="public"
5042 deprecated="not deprecated">
5043 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;R&gt;"/>
5044 </method>
5045 <method name="applyTo"
5046 abstract="false" native="false" synchronized="false"
5047 static="false" final="false" visibility="public"
5048 deprecated="not deprecated">
5049 <param name="binder" type="com.google.inject.Binder"/>
5050 </method>
5051 <doc>
5052 <![CDATA[A request to inject the instance fields and methods of an instance. Requests are created
5053 explicitly in a module using {@link com.google.inject.Binder#requestInjection(Object)
5054 requestInjection()} statements:
5055 <pre>
5056 requestInjection(serviceInstance);</pre>
5057
5058 @author mikeward@google.com (Mike Ward)
5059 @since 2.0]]>
5060 </doc>
5061 </class>
5062 <!-- end class com.google.inject.spi.InjectionRequest -->
5063 <!-- start interface com.google.inject.spi.InstanceBinding -->
5064 <interface name="InstanceBinding" abstract="true"
5065 static="false" final="false" visibility="public"
5066 deprecated="not deprecated">
5067 <implements name="com.google.inject.Binding&lt;T&gt;"/>
5068 <implements name="com.google.inject.spi.HasDependencies"/>
5069 <method name="getInstance" return="T"
5070 abstract="false" native="false" synchronized="false"
5071 static="false" final="false" visibility="public"
5072 deprecated="not deprecated">
5073 <doc>
5074 <![CDATA[Returns the user-supplied instance.]]>
5075 </doc>
5076 </method>
5077 <method name="getInjectionPoints" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
5078 abstract="false" native="false" synchronized="false"
5079 static="false" final="false" visibility="public"
5080 deprecated="not deprecated">
5081 <doc>
5082 <![CDATA[Returns the field and method injection points of the instance, injected at injector-creation
5083 time only.
5084
5085 @return a possibly empty set]]>
5086 </doc>
5087 </method>
5088 <doc>
5089 <![CDATA[A binding to a single instance. The same instance is returned for every injection.
5090
5091 @author jessewilson@google.com (Jesse Wilson)
5092 @since 2.0]]>
5093 </doc>
5094 </interface>
5095 <!-- end interface com.google.inject.spi.InstanceBinding -->
5096 <!-- start class com.google.inject.spi.InterceptorBinding -->
5097 <class name="InterceptorBinding" extends="java.lang.Object"
5098 abstract="false"
5099 static="false" final="true" visibility="public"
5100 deprecated="not deprecated">
5101 <implements name="com.google.inject.spi.Element"/>
5102 <method name="getSource" return="java.lang.Object"
5103 abstract="false" native="false" synchronized="false"
5104 static="false" final="false" visibility="public"
5105 deprecated="not deprecated">
5106 </method>
5107 <method name="getClassMatcher" return="com.google.inject.matcher.Matcher&lt;? super java.lang.Class&lt;?&gt;&gt;"
5108 abstract="false" native="false" synchronized="false"
5109 static="false" final="false" visibility="public"
5110 deprecated="not deprecated">
5111 </method>
5112 <method name="getMethodMatcher" return="com.google.inject.matcher.Matcher&lt;? super java.lang.reflect.Method&gt;"
5113 abstract="false" native="false" synchronized="false"
5114 static="false" final="false" visibility="public"
5115 deprecated="not deprecated">
5116 </method>
5117 <method name="getInterceptors" return="java.util.List&lt;MethodInterceptor&gt;"
5118 abstract="false" native="false" synchronized="false"
5119 static="false" final="false" visibility="public"
5120 deprecated="not deprecated">
5121 </method>
5122 <method name="acceptVisitor" return="T"
5123 abstract="false" native="false" synchronized="false"
5124 static="false" final="false" visibility="public"
5125 deprecated="not deprecated">
5126 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
5127 </method>
5128 <method name="applyTo"
5129 abstract="false" native="false" synchronized="false"
5130 static="false" final="false" visibility="public"
5131 deprecated="not deprecated">
5132 <param name="binder" type="com.google.inject.Binder"/>
5133 </method>
5134 <doc>
5135 <![CDATA[Registration of interceptors for matching methods of matching classes. Instances are created
5136 explicitly in a module using {@link com.google.inject.Binder#bindInterceptor(
5137 Matcher, Matcher, MethodInterceptor[]) bindInterceptor()} statements:
5138 <pre>
5139 bindInterceptor(Matchers.subclassesOf(MyAction.class),
5140 Matchers.annotatedWith(Transactional.class),
5141 new MyTransactionInterceptor());</pre>
5142
5143 or from an injectable type listener using {@link TypeEncounter#bindInterceptor(Matcher,
5144 org.aopalliance.intercept.MethodInterceptor[]) TypeEncounter.bindInterceptor()}.
5145
5146 @author jessewilson@google.com (Jesse Wilson)
5147 @since 2.0]]>
5148 </doc>
5149 </class>
5150 <!-- end class com.google.inject.spi.InterceptorBinding -->
5151 <!-- start interface com.google.inject.spi.LinkedKeyBinding -->
5152 <interface name="LinkedKeyBinding" abstract="true"
5153 static="false" final="false" visibility="public"
5154 deprecated="not deprecated">
5155 <implements name="com.google.inject.Binding&lt;T&gt;"/>
5156 <method name="getLinkedKey" return="com.google.inject.Key&lt;? extends T&gt;"
5157 abstract="false" native="false" synchronized="false"
5158 static="false" final="false" visibility="public"
5159 deprecated="not deprecated">
5160 <doc>
5161 <![CDATA[Returns the linked key used to resolve injections. That binding can be retrieved from an
5162 injector using {@link com.google.inject.Injector#getBinding(Key) Injector.getBinding(key)}.]]>
5163 </doc>
5164 </method>
5165 <doc>
5166 <![CDATA[A binding to a linked key. The other key's binding is used to resolve injections.
5167
5168 @author jessewilson@google.com (Jesse Wilson)
5169 @since 2.0]]>
5170 </doc>
5171 </interface>
5172 <!-- end interface com.google.inject.spi.LinkedKeyBinding -->
5173 <!-- start class com.google.inject.spi.MembersInjectorLookup -->
5174 <class name="MembersInjectorLookup" extends="java.lang.Object"
5175 abstract="false"
5176 static="false" final="true" visibility="public"
5177 deprecated="not deprecated">
5178 <implements name="com.google.inject.spi.Element"/>
5179 <constructor name="MembersInjectorLookup" type="java.lang.Object, com.google.inject.TypeLiteral&lt;T&gt;"
5180 static="false" final="false" visibility="public"
5181 deprecated="not deprecated">
5182 </constructor>
5183 <method name="getSource" return="java.lang.Object"
5184 abstract="false" native="false" synchronized="false"
5185 static="false" final="false" visibility="public"
5186 deprecated="not deprecated">
5187 </method>
5188 <method name="getType" return="com.google.inject.TypeLiteral&lt;T&gt;"
5189 abstract="false" native="false" synchronized="false"
5190 static="false" final="false" visibility="public"
5191 deprecated="not deprecated">
5192 <doc>
5193 <![CDATA[Gets the type containing the members to be injected.]]>
5194 </doc>
5195 </method>
5196 <method name="acceptVisitor" return="T"
5197 abstract="false" native="false" synchronized="false"
5198 static="false" final="false" visibility="public"
5199 deprecated="not deprecated">
5200 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
5201 </method>
5202 <method name="initializeDelegate"
5203 abstract="false" native="false" synchronized="false"
5204 static="false" final="false" visibility="public"
5205 deprecated="not deprecated">
5206 <param name="delegate" type="com.google.inject.MembersInjector&lt;T&gt;"/>
5207 <doc>
5208 <![CDATA[Sets the actual members injector.
5209
5210 @throws IllegalStateException if the delegate is already set]]>
5211 </doc>
5212 </method>
5213 <method name="applyTo"
5214 abstract="false" native="false" synchronized="false"
5215 static="false" final="false" visibility="public"
5216 deprecated="not deprecated">
5217 <param name="binder" type="com.google.inject.Binder"/>
5218 </method>
5219 <method name="getDelegate" return="com.google.inject.MembersInjector&lt;T&gt;"
5220 abstract="false" native="false" synchronized="false"
5221 static="false" final="false" visibility="public"
5222 deprecated="not deprecated">
5223 <doc>
5224 <![CDATA[Returns the delegate members injector, or {@code null} if it has not yet been initialized.
5225 The delegate will be initialized when this element is processed, or otherwise used to create
5226 an injector.]]>
5227 </doc>
5228 </method>
5229 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
5230 abstract="false" native="false" synchronized="false"
5231 static="false" final="false" visibility="public"
5232 deprecated="not deprecated">
5233 <doc>
5234 <![CDATA[Returns the looked up members injector. The result is not valid until this lookup has been
5235 initialized, which usually happens when the injector is created. The members injector will
5236 throw an {@code IllegalStateException} if you try to use it beforehand.]]>
5237 </doc>
5238 </method>
5239 <doc>
5240 <![CDATA[A lookup of the members injector for a type. Lookups are created explicitly in a module using
5241 {@link com.google.inject.Binder#getMembersInjector(Class) getMembersInjector()} statements:
5242 <pre>
5243 MembersInjector&lt;PaymentService&gt; membersInjector
5244 = getMembersInjector(PaymentService.class);</pre>
5245
5246 @author crazybob@google.com (Bob Lee)
5247 @since 2.0]]>
5248 </doc>
5249 </class>
5250 <!-- end class com.google.inject.spi.MembersInjectorLookup -->
5251 <!-- start class com.google.inject.spi.Message -->
5252 <class name="Message" extends="java.lang.Object"
5253 abstract="false"
5254 static="false" final="true" visibility="public"
5255 deprecated="not deprecated">
5256 <implements name="java.io.Serializable"/>
5257 <implements name="com.google.inject.spi.Element"/>
5258 <constructor name="Message" type="java.util.List&lt;java.lang.Object&gt;, java.lang.String, java.lang.Throwable"
5259 static="false" final="false" visibility="public"
5260 deprecated="not deprecated">
5261 <doc>
5262 <![CDATA[@since 2.0]]>
5263 </doc>
5264 </constructor>
5265 <constructor name="Message" type="java.lang.Object, java.lang.String"
5266 static="false" final="false" visibility="public"
5267 deprecated="not deprecated">
5268 </constructor>
5269 <constructor name="Message" type="java.lang.String"
5270 static="false" final="false" visibility="public"
5271 deprecated="not deprecated">
5272 </constructor>
5273 <method name="getSource" return="java.lang.String"
5274 abstract="false" native="false" synchronized="false"
5275 static="false" final="false" visibility="public"
5276 deprecated="not deprecated">
5277 </method>
5278 <method name="getSources" return="java.util.List&lt;java.lang.Object&gt;"
5279 abstract="false" native="false" synchronized="false"
5280 static="false" final="false" visibility="public"
5281 deprecated="not deprecated">
5282 <doc>
5283 <![CDATA[@since 2.0]]>
5284 </doc>
5285 </method>
5286 <method name="getMessage" return="java.lang.String"
5287 abstract="false" native="false" synchronized="false"
5288 static="false" final="false" visibility="public"
5289 deprecated="not deprecated">
5290 <doc>
5291 <![CDATA[Gets the error message text.]]>
5292 </doc>
5293 </method>
5294 <method name="acceptVisitor" return="T"
5295 abstract="false" native="false" synchronized="false"
5296 static="false" final="false" visibility="public"
5297 deprecated="not deprecated">
5298 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
5299 <doc>
5300 <![CDATA[@since 2.0]]>
5301 </doc>
5302 </method>
5303 <method name="getCause" return="java.lang.Throwable"
5304 abstract="false" native="false" synchronized="false"
5305 static="false" final="false" visibility="public"
5306 deprecated="not deprecated">
5307 <doc>
5308 <![CDATA[Returns the throwable that caused this message, or {@code null} if this
5309 message was not caused by a throwable.
5310
5311 @since 2.0]]>
5312 </doc>
5313 </method>
5314 <method name="toString" return="java.lang.String"
5315 abstract="false" native="false" synchronized="false"
5316 static="false" final="false" visibility="public"
5317 deprecated="not deprecated">
5318 </method>
5319 <method name="hashCode" return="int"
5320 abstract="false" native="false" synchronized="false"
5321 static="false" final="false" visibility="public"
5322 deprecated="not deprecated">
5323 </method>
5324 <method name="equals" return="boolean"
5325 abstract="false" native="false" synchronized="false"
5326 static="false" final="false" visibility="public"
5327 deprecated="not deprecated">
5328 <param name="o" type="java.lang.Object"/>
5329 </method>
5330 <method name="applyTo"
5331 abstract="false" native="false" synchronized="false"
5332 static="false" final="false" visibility="public"
5333 deprecated="not deprecated">
5334 <param name="binder" type="com.google.inject.Binder"/>
5335 <doc>
5336 <![CDATA[@since 2.0]]>
5337 </doc>
5338 </method>
5339 <doc>
5340 <![CDATA[An error message and the context in which it occured. Messages are usually created internally by
5341 Guice and its extensions. Messages can be created explicitly in a module using {@link
5342 com.google.inject.Binder#addError(Throwable) addError()} statements:
5343 <pre>
5344 try {
5345 bindPropertiesFromFile();
5346 } catch (IOException e) {
5347 addError(e);
5348 }</pre>
5349
5350 @author crazybob@google.com (Bob Lee)]]>
5351 </doc>
5352 </class>
5353 <!-- end class com.google.inject.spi.Message -->
5354 <!-- start interface com.google.inject.spi.PrivateElements -->
5355 <interface name="PrivateElements" abstract="true"
5356 static="false" final="false" visibility="public"
5357 deprecated="not deprecated">
5358 <implements name="com.google.inject.spi.Element"/>
5359 <method name="getElements" return="java.util.List&lt;com.google.inject.spi.Element&gt;"
5360 abstract="false" native="false" synchronized="false"
5361 static="false" final="false" visibility="public"
5362 deprecated="not deprecated">
5363 <doc>
5364 <![CDATA[Returns the configuration information in this private environment.]]>
5365 </doc>
5366 </method>
5367 <method name="getInjector" return="com.google.inject.Injector"
5368 abstract="false" native="false" synchronized="false"
5369 static="false" final="false" visibility="public"
5370 deprecated="not deprecated">
5371 <doc>
5372 <![CDATA[Returns the child injector that hosts these private elements, or null if the elements haven't
5373 been used to create an injector.]]>
5374 </doc>
5375 </method>
5376 <method name="getExposedKeys" return="java.util.Set&lt;com.google.inject.Key&lt;?&gt;&gt;"
5377 abstract="false" native="false" synchronized="false"
5378 static="false" final="false" visibility="public"
5379 deprecated="not deprecated">
5380 <doc>
5381 <![CDATA[Returns the unique exposed keys for these private elements.]]>
5382 </doc>
5383 </method>
5384 <method name="getExposedSource" return="java.lang.Object"
5385 abstract="false" native="false" synchronized="false"
5386 static="false" final="false" visibility="public"
5387 deprecated="not deprecated">
5388 <param name="key" type="com.google.inject.Key&lt;?&gt;"/>
5389 <doc>
5390 <![CDATA[Returns an arbitrary object containing information about the "place" where this key was
5391 exposed. Used by Guice in the production of descriptive error messages.
5392
5393 <p>Tools might specially handle types they know about; {@code StackTraceElement} is a good
5394 example. Tools should simply call {@code toString()} on the source object if the type is
5395 unfamiliar.
5396
5397 @param key one of the keys exposed by this module.]]>
5398 </doc>
5399 </method>
5400 <doc>
5401 <![CDATA[A private collection of elements that are hidden from the enclosing injector or module by
5402 default. See {@link com.google.inject.PrivateModule PrivateModule} for details.
5403
5404 @author jessewilson@google.com (Jesse Wilson)
5405 @since 2.0]]>
5406 </doc>
5407 </interface>
5408 <!-- end interface com.google.inject.spi.PrivateElements -->
5409 <!-- start interface com.google.inject.spi.ProviderBinding -->
5410 <interface name="ProviderBinding" abstract="true"
5411 static="false" final="false" visibility="public"
5412 deprecated="not deprecated">
5413 <implements name="com.google.inject.Binding&lt;T&gt;"/>
5414 <method name="getProvidedKey" return="com.google.inject.Key&lt;?&gt;"
5415 abstract="false" native="false" synchronized="false"
5416 static="false" final="false" visibility="public"
5417 deprecated="not deprecated">
5418 <doc>
5419 <![CDATA[Returns the key whose binding is used to {@link Provider#get provide instances}. That binding
5420 can be retrieved from an injector using {@link com.google.inject.Injector#getBinding(Key)
5421 Injector.getBinding(providedKey)}]]>
5422 </doc>
5423 </method>
5424 <doc>
5425 <![CDATA[A binding to a {@link Provider} that delegates to the binding for the provided type. This binding
5426 is used whenever a {@code Provider<T>} is injected (as opposed to injecting {@code T} directly).
5427
5428 @author jessewilson@google.com (Jesse Wilson)
5429 @since 2.0]]>
5430 </doc>
5431 </interface>
5432 <!-- end interface com.google.inject.spi.ProviderBinding -->
5433 <!-- start interface com.google.inject.spi.ProviderInstanceBinding -->
5434 <interface name="ProviderInstanceBinding" abstract="true"
5435 static="false" final="false" visibility="public"
5436 deprecated="not deprecated">
5437 <implements name="com.google.inject.Binding&lt;T&gt;"/>
5438 <implements name="com.google.inject.spi.HasDependencies"/>
5439 <method name="getProviderInstance" return="com.google.inject.Provider&lt;? extends T&gt;"
5440 abstract="false" native="false" synchronized="false"
5441 static="false" final="false" visibility="public"
5442 deprecated="not deprecated">
5443 <doc>
5444 <![CDATA[Returns the user-supplied, unscoped provider.]]>
5445 </doc>
5446 </method>
5447 <method name="getInjectionPoints" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
5448 abstract="false" native="false" synchronized="false"
5449 static="false" final="false" visibility="public"
5450 deprecated="not deprecated">
5451 <doc>
5452 <![CDATA[Returns the field and method injection points of the provider, injected at injector-creation
5453 time only.
5454
5455 @return a possibly empty set]]>
5456 </doc>
5457 </method>
5458 <doc>
5459 <![CDATA[A binding to a provider instance. The provider's {@code get} method is invoked to resolve
5460 injections.
5461
5462 @author jessewilson@google.com (Jesse Wilson)
5463 @since 2.0]]>
5464 </doc>
5465 </interface>
5466 <!-- end interface com.google.inject.spi.ProviderInstanceBinding -->
5467 <!-- start interface com.google.inject.spi.ProviderKeyBinding -->
5468 <interface name="ProviderKeyBinding" abstract="true"
5469 static="false" final="false" visibility="public"
5470 deprecated="not deprecated">
5471 <implements name="com.google.inject.Binding&lt;T&gt;"/>
5472 <method name="getProviderKey" return="com.google.inject.Key&lt;? extends com.google.inject.Provider&lt;? extends T&gt;&gt;"
5473 abstract="false" native="false" synchronized="false"
5474 static="false" final="false" visibility="public"
5475 deprecated="not deprecated">
5476 <doc>
5477 <![CDATA[Returns the key used to resolve the provider's binding. That binding can be retrieved from an
5478 injector using {@link com.google.inject.Injector#getBinding(Key)
5479 Injector.getBinding(providerKey)}]]>
5480 </doc>
5481 </method>
5482 <doc>
5483 <![CDATA[A binding to a provider key. To resolve injections, the provider key is first resolved, then that
5484 provider's {@code get} method is invoked.
5485
5486 @author jessewilson@google.com (Jesse Wilson)
5487 @since 2.0]]>
5488 </doc>
5489 </interface>
5490 <!-- end interface com.google.inject.spi.ProviderKeyBinding -->
5491 <!-- start class com.google.inject.spi.ProviderLookup -->
5492 <class name="ProviderLookup" extends="java.lang.Object"
5493 abstract="false"
5494 static="false" final="true" visibility="public"
5495 deprecated="not deprecated">
5496 <implements name="com.google.inject.spi.Element"/>
5497 <constructor name="ProviderLookup" type="java.lang.Object, com.google.inject.Key&lt;T&gt;"
5498 static="false" final="false" visibility="public"
5499 deprecated="not deprecated">
5500 </constructor>
5501 <method name="getSource" return="java.lang.Object"
5502 abstract="false" native="false" synchronized="false"
5503 static="false" final="false" visibility="public"
5504 deprecated="not deprecated">
5505 </method>
5506 <method name="getKey" return="com.google.inject.Key&lt;T&gt;"
5507 abstract="false" native="false" synchronized="false"
5508 static="false" final="false" visibility="public"
5509 deprecated="not deprecated">
5510 </method>
5511 <method name="acceptVisitor" return="T"
5512 abstract="false" native="false" synchronized="false"
5513 static="false" final="false" visibility="public"
5514 deprecated="not deprecated">
5515 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
5516 </method>
5517 <method name="initializeDelegate"
5518 abstract="false" native="false" synchronized="false"
5519 static="false" final="false" visibility="public"
5520 deprecated="not deprecated">
5521 <param name="delegate" type="com.google.inject.Provider&lt;T&gt;"/>
5522 <doc>
5523 <![CDATA[Sets the actual provider.
5524
5525 @throws IllegalStateException if the delegate is already set]]>
5526 </doc>
5527 </method>
5528 <method name="applyTo"
5529 abstract="false" native="false" synchronized="false"
5530 static="false" final="false" visibility="public"
5531 deprecated="not deprecated">
5532 <param name="binder" type="com.google.inject.Binder"/>
5533 </method>
5534 <method name="getDelegate" return="com.google.inject.Provider&lt;T&gt;"
5535 abstract="false" native="false" synchronized="false"
5536 static="false" final="false" visibility="public"
5537 deprecated="not deprecated">
5538 <doc>
5539 <![CDATA[Returns the delegate provider, or {@code null} if it has not yet been initialized. The delegate
5540 will be initialized when this element is processed, or otherwise used to create an injector.]]>
5541 </doc>
5542 </method>
5543 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
5544 abstract="false" native="false" synchronized="false"
5545 static="false" final="false" visibility="public"
5546 deprecated="not deprecated">
5547 <doc>
5548 <![CDATA[Returns the looked up provider. The result is not valid until this lookup has been initialized,
5549 which usually happens when the injector is created. The provider will throw an {@code
5550 IllegalStateException} if you try to use it beforehand.]]>
5551 </doc>
5552 </method>
5553 <doc>
5554 <![CDATA[A lookup of the provider for a type. Lookups are created explicitly in a module using
5555 {@link com.google.inject.Binder#getProvider(Class) getProvider()} statements:
5556 <pre>
5557 Provider&lt;PaymentService&gt; paymentServiceProvider
5558 = getProvider(PaymentService.class);</pre>
5559
5560 @author jessewilson@google.com (Jesse Wilson)
5561 @since 2.0]]>
5562 </doc>
5563 </class>
5564 <!-- end class com.google.inject.spi.ProviderLookup -->
5565 <!-- start interface com.google.inject.spi.ProviderWithDependencies -->
5566 <interface name="ProviderWithDependencies" abstract="true"
5567 static="false" final="false" visibility="public"
5568 deprecated="not deprecated">
5569 <implements name="com.google.inject.Provider&lt;T&gt;"/>
5570 <implements name="com.google.inject.spi.HasDependencies"/>
5571 <doc>
5572 <![CDATA[A provider with dependencies on other injected types. If a {@link Provider} has dependencies that
5573 aren't specified in injections, this interface should be used to expose all dependencies.
5574
5575 @since 2.0]]>
5576 </doc>
5577 </interface>
5578 <!-- end interface com.google.inject.spi.ProviderWithDependencies -->
5579 <!-- start class com.google.inject.spi.ScopeBinding -->
5580 <class name="ScopeBinding" extends="java.lang.Object"
5581 abstract="false"
5582 static="false" final="true" visibility="public"
5583 deprecated="not deprecated">
5584 <implements name="com.google.inject.spi.Element"/>
5585 <method name="getSource" return="java.lang.Object"
5586 abstract="false" native="false" synchronized="false"
5587 static="false" final="false" visibility="public"
5588 deprecated="not deprecated">
5589 </method>
5590 <method name="getAnnotationType" return="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"
5591 abstract="false" native="false" synchronized="false"
5592 static="false" final="false" visibility="public"
5593 deprecated="not deprecated">
5594 </method>
5595 <method name="getScope" return="com.google.inject.Scope"
5596 abstract="false" native="false" synchronized="false"
5597 static="false" final="false" visibility="public"
5598 deprecated="not deprecated">
5599 </method>
5600 <method name="acceptVisitor" return="T"
5601 abstract="false" native="false" synchronized="false"
5602 static="false" final="false" visibility="public"
5603 deprecated="not deprecated">
5604 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
5605 </method>
5606 <method name="applyTo"
5607 abstract="false" native="false" synchronized="false"
5608 static="false" final="false" visibility="public"
5609 deprecated="not deprecated">
5610 <param name="binder" type="com.google.inject.Binder"/>
5611 </method>
5612 <doc>
5613 <![CDATA[Registration of a scope annotation with the scope that implements it. Instances are created
5614 explicitly in a module using {@link com.google.inject.Binder#bindScope(Class, Scope) bindScope()}
5615 statements:
5616 <pre>
5617 Scope recordScope = new RecordScope();
5618 bindScope(RecordScoped.class, new RecordScope());</pre>
5619
5620 @author jessewilson@google.com (Jesse Wilson)
5621 @since 2.0]]>
5622 </doc>
5623 </class>
5624 <!-- end class com.google.inject.spi.ScopeBinding -->
5625 <!-- start class com.google.inject.spi.StaticInjectionRequest -->
5626 <class name="StaticInjectionRequest" extends="java.lang.Object"
5627 abstract="false"
5628 static="false" final="true" visibility="public"
5629 deprecated="not deprecated">
5630 <implements name="com.google.inject.spi.Element"/>
5631 <method name="getSource" return="java.lang.Object"
5632 abstract="false" native="false" synchronized="false"
5633 static="false" final="false" visibility="public"
5634 deprecated="not deprecated">
5635 </method>
5636 <method name="getType" return="java.lang.Class&lt;?&gt;"
5637 abstract="false" native="false" synchronized="false"
5638 static="false" final="false" visibility="public"
5639 deprecated="not deprecated">
5640 </method>
5641 <method name="getInjectionPoints" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
5642 abstract="false" native="false" synchronized="false"
5643 static="false" final="false" visibility="public"
5644 deprecated="not deprecated">
5645 <exception name="ConfigurationException" type="com.google.inject.ConfigurationException"/>
5646 <doc>
5647 <![CDATA[Returns the static methods and fields of {@code type} that will be injected to fulfill this
5648 request.
5649
5650 @return a possibly empty set of injection points. The set has a specified iteration order. All
5651 fields are returned and then all methods. Within the fields, supertype fields are returned
5652 before subtype fields. Similarly, supertype methods are returned before subtype methods.
5653 @throws ConfigurationException if there is a malformed injection point on {@code type}, such as
5654 a field with multiple binding annotations. The exception's {@link
5655 ConfigurationException#getPartialValue() partial value} is a {@code Set<InjectionPoint>}
5656 of the valid injection points.]]>
5657 </doc>
5658 </method>
5659 <method name="applyTo"
5660 abstract="false" native="false" synchronized="false"
5661 static="false" final="false" visibility="public"
5662 deprecated="not deprecated">
5663 <param name="binder" type="com.google.inject.Binder"/>
5664 </method>
5665 <method name="acceptVisitor" return="T"
5666 abstract="false" native="false" synchronized="false"
5667 static="false" final="false" visibility="public"
5668 deprecated="not deprecated">
5669 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
5670 </method>
5671 <doc>
5672 <![CDATA[A request to inject the static fields and methods of a type. Requests are created
5673 explicitly in a module using {@link com.google.inject.Binder#requestStaticInjection(Class[])
5674 requestStaticInjection()} statements:
5675 <pre>
5676 requestStaticInjection(MyLegacyService.class);</pre>
5677
5678 @author jessewilson@google.com (Jesse Wilson)
5679 @since 2.0]]>
5680 </doc>
5681 </class>
5682 <!-- end class com.google.inject.spi.StaticInjectionRequest -->
5683 <!-- start interface com.google.inject.spi.TypeConverter -->
5684 <interface name="TypeConverter" abstract="true"
5685 static="false" final="false" visibility="public"
5686 deprecated="not deprecated">
5687 <method name="convert" return="java.lang.Object"
5688 abstract="false" native="false" synchronized="false"
5689 static="false" final="false" visibility="public"
5690 deprecated="not deprecated">
5691 <param name="value" type="java.lang.String"/>
5692 <param name="toType" type="com.google.inject.TypeLiteral&lt;?&gt;"/>
5693 <doc>
5694 <![CDATA[Converts a string value. Throws an exception if a conversion error occurs.]]>
5695 </doc>
5696 </method>
5697 <doc>
5698 <![CDATA[Converts constant string values to a different type.
5699
5700 @author crazybob@google.com (Bob Lee)
5701 @since 2.0]]>
5702 </doc>
5703 </interface>
5704 <!-- end interface com.google.inject.spi.TypeConverter -->
5705 <!-- start class com.google.inject.spi.TypeConverterBinding -->
5706 <class name="TypeConverterBinding" extends="java.lang.Object"
5707 abstract="false"
5708 static="false" final="true" visibility="public"
5709 deprecated="not deprecated">
5710 <implements name="com.google.inject.spi.Element"/>
5711 <method name="getSource" return="java.lang.Object"
5712 abstract="false" native="false" synchronized="false"
5713 static="false" final="false" visibility="public"
5714 deprecated="not deprecated">
5715 </method>
5716 <method name="getTypeMatcher" return="com.google.inject.matcher.Matcher&lt;? super com.google.inject.TypeLiteral&lt;?&gt;&gt;"
5717 abstract="false" native="false" synchronized="false"
5718 static="false" final="false" visibility="public"
5719 deprecated="not deprecated">
5720 </method>
5721 <method name="getTypeConverter" return="com.google.inject.spi.TypeConverter"
5722 abstract="false" native="false" synchronized="false"
5723 static="false" final="false" visibility="public"
5724 deprecated="not deprecated">
5725 </method>
5726 <method name="acceptVisitor" return="T"
5727 abstract="false" native="false" synchronized="false"
5728 static="false" final="false" visibility="public"
5729 deprecated="not deprecated">
5730 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
5731 </method>
5732 <method name="applyTo"
5733 abstract="false" native="false" synchronized="false"
5734 static="false" final="false" visibility="public"
5735 deprecated="not deprecated">
5736 <param name="binder" type="com.google.inject.Binder"/>
5737 </method>
5738 <doc>
5739 <![CDATA[Registration of type converters for matching target types. Instances are created
5740 explicitly in a module using {@link com.google.inject.Binder#convertToTypes(Matcher,
5741 TypeConverter) convertToTypes()} statements:
5742 <pre>
5743 convertToTypes(Matchers.only(DateTime.class), new DateTimeConverter());</pre>
5744
5745 @author jessewilson@google.com (Jesse Wilson)
5746 @since 2.0]]>
5747 </doc>
5748 </class>
5749 <!-- end class com.google.inject.spi.TypeConverterBinding -->
5750 <!-- start interface com.google.inject.spi.TypeEncounter -->
5751 <interface name="TypeEncounter" abstract="true"
5752 static="false" final="false" visibility="public"
5753 deprecated="not deprecated">
5754 <method name="addError"
5755 abstract="false" native="false" synchronized="false"
5756 static="false" final="false" visibility="public"
5757 deprecated="not deprecated">
5758 <param name="message" type="java.lang.String"/>
5759 <param name="arguments" type="java.lang.Object[]"/>
5760 <doc>
5761 <![CDATA[Records an error message for type {@code I} which will be presented to the user at a later
5762 time. Unlike throwing an exception, this enable us to continue configuring the Injector and
5763 discover more errors. Uses {@link String#format(String, Object[])} to insert the arguments
5764 into the message.]]>
5765 </doc>
5766 </method>
5767 <method name="addError"
5768 abstract="false" native="false" synchronized="false"
5769 static="false" final="false" visibility="public"
5770 deprecated="not deprecated">
5771 <param name="t" type="java.lang.Throwable"/>
5772 <doc>
5773 <![CDATA[Records an exception for type {@code I}, the full details of which will be logged, and the
5774 message of which will be presented to the user at a later time. If your type listener calls
5775 something that you worry may fail, you should catch the exception and pass it to this method.]]>
5776 </doc>
5777 </method>
5778 <method name="addError"
5779 abstract="false" native="false" synchronized="false"
5780 static="false" final="false" visibility="public"
5781 deprecated="not deprecated">
5782 <param name="message" type="com.google.inject.spi.Message"/>
5783 <doc>
5784 <![CDATA[Records an error message to be presented to the user at a later time.]]>
5785 </doc>
5786 </method>
5787 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
5788 abstract="false" native="false" synchronized="false"
5789 static="false" final="false" visibility="public"
5790 deprecated="not deprecated">
5791 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
5792 <doc>
5793 <![CDATA[Returns the provider used to obtain instances for the given injection key. The returned
5794 provider will not be valid until the injector has been created. The provider will throw an
5795 {@code IllegalStateException} if you try to use it beforehand.]]>
5796 </doc>
5797 </method>
5798 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
5799 abstract="false" native="false" synchronized="false"
5800 static="false" final="false" visibility="public"
5801 deprecated="not deprecated">
5802 <param name="type" type="java.lang.Class&lt;T&gt;"/>
5803 <doc>
5804 <![CDATA[Returns the provider used to obtain instances for the given injection type. The returned
5805 provider will not be valid until the injetor has been created. The provider will throw an
5806 {@code IllegalStateException} if you try to use it beforehand.]]>
5807 </doc>
5808 </method>
5809 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
5810 abstract="false" native="false" synchronized="false"
5811 static="false" final="false" visibility="public"
5812 deprecated="not deprecated">
5813 <param name="typeLiteral" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
5814 <doc>
5815 <![CDATA[Returns the members injector used to inject dependencies into methods and fields on instances
5816 of the given type {@code T}. The returned members injector will not be valid until the main
5817 injector has been created. The members injector will throw an {@code IllegalStateException}
5818 if you try to use it beforehand.
5819
5820 @param typeLiteral type to get members injector for]]>
5821 </doc>
5822 </method>
5823 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
5824 abstract="false" native="false" synchronized="false"
5825 static="false" final="false" visibility="public"
5826 deprecated="not deprecated">
5827 <param name="type" type="java.lang.Class&lt;T&gt;"/>
5828 <doc>
5829 <![CDATA[Returns the members injector used to inject dependencies into methods and fields on instances
5830 of the given type {@code T}. The returned members injector will not be valid until the main
5831 injector has been created. The members injector will throw an {@code IllegalStateException}
5832 if you try to use it beforehand.
5833
5834 @param type type to get members injector for]]>
5835 </doc>
5836 </method>
5837 <method name="register"
5838 abstract="false" native="false" synchronized="false"
5839 static="false" final="false" visibility="public"
5840 deprecated="not deprecated">
5841 <param name="membersInjector" type="com.google.inject.MembersInjector&lt;? super I&gt;"/>
5842 <doc>
5843 <![CDATA[Registers a members injector for type {@code I}. Guice will use the members injector after its
5844 performed its own injections on an instance of {@code I}.]]>
5845 </doc>
5846 </method>
5847 <method name="register"
5848 abstract="false" native="false" synchronized="false"
5849 static="false" final="false" visibility="public"
5850 deprecated="not deprecated">
5851 <param name="listener" type="com.google.inject.spi.InjectionListener&lt;? super I&gt;"/>
5852 <doc>
5853 <![CDATA[Registers an injection listener for type {@code I}. Guice will notify the listener after all
5854 injections have been performed on an instance of {@code I}.]]>
5855 </doc>
5856 </method>
5857 <method name="bindInterceptor"
5858 abstract="false" native="false" synchronized="false"
5859 static="false" final="false" visibility="public"
5860 deprecated="not deprecated">
5861 <param name="methodMatcher" type="com.google.inject.matcher.Matcher&lt;? super java.lang.reflect.Method&gt;"/>
5862 <param name="interceptors" type="org.aopalliance.intercept.MethodInterceptor[]"/>
5863 <doc>
5864 <![CDATA[Binds method interceptor[s] to methods matched in type {@code I} and its supertypes. A
5865 method is eligible for interception if:
5866
5867 <ul>
5868 <li>Guice created the instance the method is on</li>
5869 <li>Neither the enclosing type nor the method is final</li>
5870 <li>And the method is package-private or more accessible</li>
5871 </ul>
5872
5873 @param methodMatcher matches methods the interceptor should apply to. For
5874 example: {@code annotatedWith(Transactional.class)}.
5875 @param interceptors to bind]]>
5876 </doc>
5877 </method>
5878 <doc>
5879 <![CDATA[Context of an injectable type encounter. Enables reporting errors, registering injection
5880 listeners and binding method interceptors for injectable type {@code I}. It is an error to use
5881 an encounter after the {@link TypeListener#hear(TypeLiteral, TypeEncounter) hear()} method has
5882 returned.
5883
5884 @param <I> the injectable type encountered
5885 @since 2.0]]>
5886 </doc>
5887 </interface>
5888 <!-- end interface com.google.inject.spi.TypeEncounter -->
5889 <!-- start interface com.google.inject.spi.TypeListener -->
5890 <interface name="TypeListener" abstract="true"
5891 static="false" final="false" visibility="public"
5892 deprecated="not deprecated">
5893 <method name="hear"
5894 abstract="false" native="false" synchronized="false"
5895 static="false" final="false" visibility="public"
5896 deprecated="not deprecated">
5897 <param name="type" type="com.google.inject.TypeLiteral&lt;I&gt;"/>
5898 <param name="encounter" type="com.google.inject.spi.TypeEncounter&lt;I&gt;"/>
5899 <doc>
5900 <![CDATA[Invoked when Guice encounters a new type eligible for constructor or members injection.
5901 Called during injector creation (or afterwords if Guice encounters a type at run time and
5902 creates a JIT binding).
5903
5904 @param type encountered by Guice
5905 @param encounter context of this encounter, enables reporting errors, registering injection
5906 listeners and binding method interceptors for {@code type}.
5907
5908 @param <I> the injectable type]]>
5909 </doc>
5910 </method>
5911 <doc>
5912 <![CDATA[Listens for Guice to encounter injectable types. If a given type has its constructor injected in
5913 one situation but only its methods and fields injected in another, Guice will notify this
5914 listener once.
5915
5916 <p>Useful for extra type checking, {@linkplain TypeEncounter#register(InjectionListener)
5917 registering injection listeners}, and {@linkplain TypeEncounter#bindInterceptor(
5918 com.google.inject.matcher.Matcher, org.aopalliance.intercept.MethodInterceptor[])
5919 binding method interceptors}.
5920
5921 @since 2.0]]>
5922 </doc>
5923 </interface>
5924 <!-- end interface com.google.inject.spi.TypeListener -->
5925 <!-- start class com.google.inject.spi.TypeListenerBinding -->
5926 <class name="TypeListenerBinding" extends="java.lang.Object"
5927 abstract="false"
5928 static="false" final="true" visibility="public"
5929 deprecated="not deprecated">
5930 <implements name="com.google.inject.spi.Element"/>
5931 <method name="getListener" return="com.google.inject.spi.TypeListener"
5932 abstract="false" native="false" synchronized="false"
5933 static="false" final="false" visibility="public"
5934 deprecated="not deprecated">
5935 <doc>
5936 <![CDATA[Returns the registered listener.]]>
5937 </doc>
5938 </method>
5939 <method name="getTypeMatcher" return="com.google.inject.matcher.Matcher&lt;? super com.google.inject.TypeLiteral&lt;?&gt;&gt;"
5940 abstract="false" native="false" synchronized="false"
5941 static="false" final="false" visibility="public"
5942 deprecated="not deprecated">
5943 <doc>
5944 <![CDATA[Returns the type matcher which chooses which types the listener should be notified of.]]>
5945 </doc>
5946 </method>
5947 <method name="getSource" return="java.lang.Object"
5948 abstract="false" native="false" synchronized="false"
5949 static="false" final="false" visibility="public"
5950 deprecated="not deprecated">
5951 </method>
5952 <method name="acceptVisitor" return="T"
5953 abstract="false" native="false" synchronized="false"
5954 static="false" final="false" visibility="public"
5955 deprecated="not deprecated">
5956 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
5957 </method>
5958 <method name="applyTo"
5959 abstract="false" native="false" synchronized="false"
5960 static="false" final="false" visibility="public"
5961 deprecated="not deprecated">
5962 <param name="binder" type="com.google.inject.Binder"/>
5963 </method>
5964 <doc>
5965 <![CDATA[Binds types (picked using a Matcher) to an type listener. Registrations are created explicitly in
5966 a module using {@link com.google.inject.Binder#bindListener(Matcher, TypeListener)} statements:
5967
5968 <pre>
5969 register(only(new TypeLiteral&lt;PaymentService&lt;CreditCard>>() {}), listener);</pre>
5970
5971 @author jessewilson@google.com (Jesse Wilson)
5972 @since 2.0]]>
5973 </doc>
5974 </class>
5975 <!-- end class com.google.inject.spi.TypeListenerBinding -->
5976 <!-- start interface com.google.inject.spi.UntargettedBinding -->
5977 <interface name="UntargettedBinding" abstract="true"
5978 static="false" final="false" visibility="public"
5979 deprecated="not deprecated">
5980 <implements name="com.google.inject.Binding&lt;T&gt;"/>
5981 <doc>
5982 <![CDATA[An untargetted binding. This binding indicates that the injector should use its implicit binding
5983 strategies to resolve injections.
5984
5985 @author jessewilson@google.com (Jesse Wilson)
5986 @since 2.0]]>
5987 </doc>
5988 </interface>
5989 <!-- end interface com.google.inject.spi.UntargettedBinding -->
5990</package>
5991<package name="com.google.inject.spring">
5992 <!-- start class com.google.inject.spring.SpringIntegration -->
5993 <class name="SpringIntegration" extends="java.lang.Object"
5994 abstract="false"
5995 static="false" final="false" visibility="public"
5996 deprecated="not deprecated">
5997 <method name="fromSpring" return="com.google.inject.Provider&lt;T&gt;"
5998 abstract="false" native="false" synchronized="false"
5999 static="true" final="false" visibility="public"
6000 deprecated="not deprecated">
6001 <param name="type" type="java.lang.Class&lt;T&gt;"/>
6002 <param name="name" type="java.lang.String"/>
6003 <doc>
6004 <![CDATA[Creates a provider which looks up objects from Spring using the given name.
6005 Expects a binding to {@link
6006 org.springframework.beans.factory.BeanFactory}. Example usage:
6007
6008 <pre>
6009 bind(DataSource.class)
6010 .toProvider(fromSpring(DataSource.class, "dataSource"));
6011 </pre>]]>
6012 </doc>
6013 </method>
6014 <method name="bindAll"
6015 abstract="false" native="false" synchronized="false"
6016 static="true" final="false" visibility="public"
6017 deprecated="not deprecated">
6018 <param name="binder" type="com.google.inject.Binder"/>
6019 <param name="beanFactory" type="ListableBeanFactory"/>
6020 <doc>
6021 <![CDATA[Binds all Spring beans from the given factory by name. For a Spring bean
6022 named "foo", this method creates a binding to the bean's type and
6023 {@code @Named("foo")}.
6024
6025 @see com.google.inject.name.Named
6026 @see com.google.inject.name.Names#named(String)]]>
6027 </doc>
6028 </method>
6029 <doc>
6030 <![CDATA[Integrates Guice with Spring.
6031
6032 @author crazybob@google.com (Bob Lee)]]>
6033 </doc>
6034 </class>
6035 <!-- end class com.google.inject.spring.SpringIntegration -->
6036</package>
6037<package name="com.google.inject.struts2">
6038 <!-- start class com.google.inject.struts2.GuiceObjectFactory -->
6039 <class name="GuiceObjectFactory" extends="ObjectFactory"
6040 abstract="false"
6041 static="false" final="false" visibility="public"
6042 deprecated="not deprecated">
6043 <constructor name="GuiceObjectFactory"
6044 static="false" final="false" visibility="public"
6045 deprecated="not deprecated">
6046 </constructor>
6047 <method name="isNoArgConstructorRequired" return="boolean"
6048 abstract="false" native="false" synchronized="false"
6049 static="false" final="false" visibility="public"
6050 deprecated="not deprecated">
6051 </method>
6052 <method name="getClassInstance" return="java.lang.Class"
6053 abstract="false" native="false" synchronized="false"
6054 static="false" final="false" visibility="public"
6055 deprecated="not deprecated">
6056 <param name="name" type="java.lang.String"/>
6057 <exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException"/>
6058 </method>
6059 <method name="buildBean" return="java.lang.Object"
6060 abstract="false" native="false" synchronized="false"
6061 static="false" final="false" visibility="public"
6062 deprecated="not deprecated">
6063 <param name="clazz" type="java.lang.Class"/>
6064 <param name="extraContext" type="java.util.Map"/>
6065 </method>
6066 <method name="buildInterceptor" return="Interceptor"
6067 abstract="false" native="false" synchronized="false"
6068 static="false" final="false" visibility="public"
6069 deprecated="not deprecated">
6070 <param name="interceptorConfig" type="InterceptorConfig"/>
6071 <param name="interceptorRefParams" type="java.util.Map"/>
6072 <exception name="ConfigurationException" type="ConfigurationException"/>
6073 </method>
6074 </class>
6075 <!-- end class com.google.inject.struts2.GuiceObjectFactory -->
6076</package>
6077<package name="com.google.inject.throwingproviders">
6078 <!-- start interface com.google.inject.throwingproviders.ThrowingProvider -->
6079 <interface name="ThrowingProvider" abstract="true"
6080 static="false" final="false" visibility="public"
6081 deprecated="not deprecated">
6082 <method name="get" return="T"
6083 abstract="false" native="false" synchronized="false"
6084 static="false" final="false" visibility="public"
6085 deprecated="not deprecated">
6086 <exception name="Exception" type="java.lang.Exception"/>
6087 </method>
6088 <doc>
6089 <![CDATA[Alternative to the Guice {@link com.google.inject.Provider} that throws
6090 a checked Exception. Users may not inject {@code T} directly.
6091
6092 <p>This interface must be extended to use application-specific exception types.
6093 Such subinterfaces may not define new methods:
6094 <pre>
6095 public interface RemoteProvider&lt;T&gt; extends ThrowingProvider&lt;T, RemoteException&gt; { }
6096 </pre>
6097
6098 <p>When this type is bound using {@link ThrowingProviderBinder}, the value returned
6099 or exception thrown by {@link #get} will be scoped. As a consequence, {@link #get}
6100 will invoked at most once within each scope.
6101
6102 @author jmourits@google.com (Jerome Mourits)
6103 @author jessewilson@google.com (Jesse Wilson)]]>
6104 </doc>
6105 </interface>
6106 <!-- end interface com.google.inject.throwingproviders.ThrowingProvider -->
6107 <!-- start class com.google.inject.throwingproviders.ThrowingProviderBinder -->
6108 <class name="ThrowingProviderBinder" extends="java.lang.Object"
6109 abstract="false"
6110 static="false" final="false" visibility="public"
6111 deprecated="not deprecated">
6112 <method name="create" return="com.google.inject.throwingproviders.ThrowingProviderBinder"
6113 abstract="false" native="false" synchronized="false"
6114 static="true" final="false" visibility="public"
6115 deprecated="not deprecated">
6116 <param name="binder" type="com.google.inject.Binder"/>
6117 </method>
6118 <method name="bind" return="com.google.inject.throwingproviders.ThrowingProviderBinder.SecondaryBinder&lt;P&gt;"
6119 abstract="false" native="false" synchronized="false"
6120 static="false" final="false" visibility="public"
6121 deprecated="not deprecated">
6122 <param name="interfaceType" type="java.lang.Class&lt;P&gt;"/>
6123 <param name="valueType" type="java.lang.reflect.Type"/>
6124 </method>
6125 <doc>
6126 <![CDATA[<p>Builds a binding for a {@link ThrowingProvider} using a fluent API:
6127 <pre><code>ThrowingProviderBinder.create(binder())
6128 .bind(RemoteProvider.class, Customer.class)
6129 .to(RemoteCustomerProvider.class)
6130 .in(RequestScope.class);
6131 </code></pre>
6132
6133 @author jmourits@google.com (Jerome Mourits)
6134 @author jessewilson@google.com (Jesse Wilson)]]>
6135 </doc>
6136 </class>
6137 <!-- end class com.google.inject.throwingproviders.ThrowingProviderBinder -->
6138 <!-- start class com.google.inject.throwingproviders.ThrowingProviderBinder.SecondaryBinder -->
6139 <class name="ThrowingProviderBinder.SecondaryBinder" extends="java.lang.Object"
6140 abstract="false"
6141 static="false" final="false" visibility="public"
6142 deprecated="not deprecated">
6143 <constructor name="ThrowingProviderBinder.SecondaryBinder" type="java.lang.Class&lt;P&gt;, java.lang.reflect.Type"
6144 static="false" final="false" visibility="public"
6145 deprecated="not deprecated">
6146 </constructor>
6147 <method name="annotatedWith" return="com.google.inject.throwingproviders.ThrowingProviderBinder.SecondaryBinder&lt;P&gt;"
6148 abstract="false" native="false" synchronized="false"
6149 static="false" final="false" visibility="public"
6150 deprecated="not deprecated">
6151 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
6152 </method>
6153 <method name="annotatedWith" return="com.google.inject.throwingproviders.ThrowingProviderBinder.SecondaryBinder&lt;P&gt;"
6154 abstract="false" native="false" synchronized="false"
6155 static="false" final="false" visibility="public"
6156 deprecated="not deprecated">
6157 <param name="annotation" type="java.lang.annotation.Annotation"/>
6158 </method>
6159 <method name="to" return="com.google.inject.binder.ScopedBindingBuilder"
6160 abstract="false" native="false" synchronized="false"
6161 static="false" final="false" visibility="public"
6162 deprecated="not deprecated">
6163 <param name="target" type="P extends com.google.inject.throwingproviders.ThrowingProvider"/>
6164 </method>
6165 <method name="to" return="com.google.inject.binder.ScopedBindingBuilder"
6166 abstract="false" native="false" synchronized="false"
6167 static="false" final="false" visibility="public"
6168 deprecated="not deprecated">
6169 <param name="targetType" type="java.lang.Class&lt;? extends P&gt;"/>
6170 </method>
6171 <method name="to" return="com.google.inject.binder.ScopedBindingBuilder"
6172 abstract="false" native="false" synchronized="false"
6173 static="false" final="false" visibility="public"
6174 deprecated="not deprecated">
6175 <param name="targetKey" type="com.google.inject.Key&lt;? extends P&gt;"/>
6176 </method>
6177 </class>
6178 <!-- end class com.google.inject.throwingproviders.ThrowingProviderBinder.SecondaryBinder -->
6179</package>
6180<package name="com.google.inject.tools.jmx">
6181 <!-- start interface com.google.inject.tools.jmx.ManagedBindingMBean -->
6182 <interface name="ManagedBindingMBean" abstract="true"
6183 static="false" final="false" visibility="public"
6184 deprecated="not deprecated">
6185 <method name="getSource" return="java.lang.String"
6186 abstract="false" native="false" synchronized="false"
6187 static="false" final="false" visibility="public"
6188 deprecated="not deprecated">
6189 <doc>
6190 <![CDATA[Gets the source of this binding.]]>
6191 </doc>
6192 </method>
6193 <method name="getProvider" return="java.lang.String"
6194 abstract="false" native="false" synchronized="false"
6195 static="false" final="false" visibility="public"
6196 deprecated="not deprecated">
6197 <doc>
6198 <![CDATA[Gets the provider to which this binding is bound.]]>
6199 </doc>
6200 </method>
6201 <method name="getKey" return="java.lang.String"
6202 abstract="false" native="false" synchronized="false"
6203 static="false" final="false" visibility="public"
6204 deprecated="not deprecated">
6205 <doc>
6206 <![CDATA[Gets the binding key.]]>
6207 </doc>
6208 </method>
6209 <doc>
6210 <![CDATA[JMX interface to bindings.
6211
6212 @author crazybob@google.com (Bob Lee)]]>
6213 </doc>
6214 </interface>
6215 <!-- end interface com.google.inject.tools.jmx.ManagedBindingMBean -->
6216 <!-- start class com.google.inject.tools.jmx.Manager -->
6217 <class name="Manager" extends="java.lang.Object"
6218 abstract="false"
6219 static="false" final="false" visibility="public"
6220 deprecated="not deprecated">
6221 <constructor name="Manager"
6222 static="false" final="false" visibility="public"
6223 deprecated="not deprecated">
6224 </constructor>
6225 <method name="manage"
6226 abstract="false" native="false" synchronized="false"
6227 static="true" final="false" visibility="public"
6228 deprecated="not deprecated">
6229 <param name="domain" type="java.lang.String"/>
6230 <param name="injector" type="com.google.inject.Injector"/>
6231 <doc>
6232 <![CDATA[Registers all the bindings of an Injector with the platform MBean server.
6233 Consider using the name of your root {@link Module} class as the domain.]]>
6234 </doc>
6235 </method>
6236 <method name="manage"
6237 abstract="false" native="false" synchronized="false"
6238 static="true" final="false" visibility="public"
6239 deprecated="not deprecated">
6240 <param name="server" type="javax.management.MBeanServer"/>
6241 <param name="domain" type="java.lang.String"/>
6242 <param name="injector" type="com.google.inject.Injector"/>
6243 <doc>
6244 <![CDATA[Registers all the bindings of an Injector with the given MBean server.
6245 Consider using the name of your root {@link Module} class as the domain.]]>
6246 </doc>
6247 </method>
6248 <method name="main"
6249 abstract="false" native="false" synchronized="false"
6250 static="true" final="false" visibility="public"
6251 deprecated="not deprecated">
6252 <param name="args" type="java.lang.String[]"/>
6253 <exception name="Exception" type="java.lang.Exception"/>
6254 <doc>
6255 <![CDATA[Run with no arguments for usage instructions.]]>
6256 </doc>
6257 </method>
6258 <doc>
6259 <![CDATA[Provides a JMX interface to Guice.
6260
6261 @author crazybob@google.com (Bob Lee)]]>
6262 </doc>
6263 </class>
6264 <!-- end class com.google.inject.tools.jmx.Manager -->
6265</package>
6266<package name="com.google.inject.util">
6267 <!-- start class com.google.inject.util.Modules -->
6268 <class name="Modules" extends="java.lang.Object"
6269 abstract="false"
6270 static="false" final="true" visibility="public"
6271 deprecated="not deprecated">
6272 <method name="override" return="com.google.inject.util.Modules.OverriddenModuleBuilder"
6273 abstract="false" native="false" synchronized="false"
6274 static="true" final="false" visibility="public"
6275 deprecated="not deprecated">
6276 <param name="modules" type="com.google.inject.Module[]"/>
6277 <doc>
6278 <![CDATA[Returns a builder that creates a module that overlays override modules over the given
6279 modules. If a key is bound in both sets of modules, only the binding from the override modules
6280 is kept. This can be used to replace the bindings of a production module with test bindings:
6281 <pre>
6282 Module functionalTestModule
6283 = Modules.override(new ProductionModule()).with(new TestModule());
6284 </pre>
6285
6286 <p>Prefer to write smaller modules that can be reused and tested without overrides.
6287
6288 @param modules the modules whose bindings are open to be overridden]]>
6289 </doc>
6290 </method>
6291 <method name="override" return="com.google.inject.util.Modules.OverriddenModuleBuilder"
6292 abstract="false" native="false" synchronized="false"
6293 static="true" final="false" visibility="public"
6294 deprecated="not deprecated">
6295 <param name="modules" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
6296 <doc>
6297 <![CDATA[Returns a builder that creates a module that overlays override modules over the given
6298 modules. If a key is bound in both sets of modules, only the binding from the override modules
6299 is kept. This can be used to replace the bindings of a production module with test bindings:
6300 <pre>
6301 Module functionalTestModule
6302 = Modules.override(getProductionModules()).with(getTestModules());
6303 </pre>
6304
6305 <p>Prefer to write smaller modules that can be reused and tested without overrides.
6306
6307 @param modules the modules whose bindings are open to be overridden]]>
6308 </doc>
6309 </method>
6310 <method name="combine" return="com.google.inject.Module"
6311 abstract="false" native="false" synchronized="false"
6312 static="true" final="false" visibility="public"
6313 deprecated="not deprecated">
6314 <param name="modules" type="com.google.inject.Module[]"/>
6315 <doc>
6316 <![CDATA[Returns a new module that installs all of {@code modules}.]]>
6317 </doc>
6318 </method>
6319 <method name="combine" return="com.google.inject.Module"
6320 abstract="false" native="false" synchronized="false"
6321 static="true" final="false" visibility="public"
6322 deprecated="not deprecated">
6323 <param name="modules" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
6324 <doc>
6325 <![CDATA[Returns a new module that installs all of {@code modules}.]]>
6326 </doc>
6327 </method>
6328 <field name="EMPTY_MODULE" type="com.google.inject.Module"
6329 transient="false" volatile="false"
6330 static="true" final="true" visibility="public"
6331 deprecated="not deprecated">
6332 </field>
6333 <doc>
6334 <![CDATA[Static utility methods for creating and working with instances of {@link Module}.
6335
6336 @author jessewilson@google.com (Jesse Wilson)
6337 @since 2.0]]>
6338 </doc>
6339 </class>
6340 <!-- end class com.google.inject.util.Modules -->
6341 <!-- start interface com.google.inject.util.Modules.OverriddenModuleBuilder -->
6342 <interface name="Modules.OverriddenModuleBuilder" abstract="true"
6343 static="true" final="false" visibility="public"
6344 deprecated="not deprecated">
6345 <method name="with" return="com.google.inject.Module"
6346 abstract="false" native="false" synchronized="false"
6347 static="false" final="false" visibility="public"
6348 deprecated="not deprecated">
6349 <param name="overrides" type="com.google.inject.Module[]"/>
6350 <doc>
6351 <![CDATA[See the EDSL example at {@link Modules#override(Module[]) override()}.]]>
6352 </doc>
6353 </method>
6354 <method name="with" return="com.google.inject.Module"
6355 abstract="false" native="false" synchronized="false"
6356 static="false" final="false" visibility="public"
6357 deprecated="not deprecated">
6358 <param name="overrides" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
6359 <doc>
6360 <![CDATA[See the EDSL example at {@link Modules#override(Module[]) override()}.]]>
6361 </doc>
6362 </method>
6363 <doc>
6364 <![CDATA[See the EDSL example at {@link Modules#override(Module[]) override()}.]]>
6365 </doc>
6366 </interface>
6367 <!-- end interface com.google.inject.util.Modules.OverriddenModuleBuilder -->
6368 <!-- start class com.google.inject.util.Providers -->
6369 <class name="Providers" extends="java.lang.Object"
6370 abstract="false"
6371 static="false" final="true" visibility="public"
6372 deprecated="not deprecated">
6373 <method name="of" return="com.google.inject.Provider&lt;T&gt;"
6374 abstract="false" native="false" synchronized="false"
6375 static="true" final="false" visibility="public"
6376 deprecated="not deprecated">
6377 <param name="instance" type="T"/>
6378 <doc>
6379 <![CDATA[Returns a provider which always provides {@code instance}. This should not
6380 be necessary to use in your application, but is helpful for several types
6381 of unit tests.
6382
6383 @param instance the instance that should always be provided. This is also
6384 permitted to be null, to enable aggressive testing, although in real
6385 life a Guice-supplied Provider will never return null.]]>
6386 </doc>
6387 </method>
6388 <doc>
6389 <![CDATA[Static utility methods for creating and working with instances of
6390 {@link Provider}.
6391
6392 @author Kevin Bourrillion (kevinb9n@gmail.com)
6393 @since 2.0]]>
6394 </doc>
6395 </class>
6396 <!-- end class com.google.inject.util.Providers -->
6397 <!-- start class com.google.inject.util.Types -->
6398 <class name="Types" extends="java.lang.Object"
6399 abstract="false"
6400 static="false" final="true" visibility="public"
6401 deprecated="not deprecated">
6402 <method name="newParameterizedType" return="java.lang.reflect.ParameterizedType"
6403 abstract="false" native="false" synchronized="false"
6404 static="true" final="false" visibility="public"
6405 deprecated="not deprecated">
6406 <param name="rawType" type="java.lang.reflect.Type"/>
6407 <param name="typeArguments" type="java.lang.reflect.Type[]"/>
6408 <doc>
6409 <![CDATA[Returns a new parameterized type, applying {@code typeArguments} to
6410 {@code rawType}. The returned type does not have an owner type.
6411
6412 @return a {@link java.io.Serializable serializable} parameterized type.]]>
6413 </doc>
6414 </method>
6415 <method name="newParameterizedTypeWithOwner" return="java.lang.reflect.ParameterizedType"
6416 abstract="false" native="false" synchronized="false"
6417 static="true" final="false" visibility="public"
6418 deprecated="not deprecated">
6419 <param name="ownerType" type="java.lang.reflect.Type"/>
6420 <param name="rawType" type="java.lang.reflect.Type"/>
6421 <param name="typeArguments" type="java.lang.reflect.Type[]"/>
6422 <doc>
6423 <![CDATA[Returns a new parameterized type, applying {@code typeArguments} to
6424 {@code rawType} and enclosed by {@code ownerType}.
6425
6426 @return a {@link java.io.Serializable serializable} parameterized type.]]>
6427 </doc>
6428 </method>
6429 <method name="arrayOf" return="java.lang.reflect.GenericArrayType"
6430 abstract="false" native="false" synchronized="false"
6431 static="true" final="false" visibility="public"
6432 deprecated="not deprecated">
6433 <param name="componentType" type="java.lang.reflect.Type"/>
6434 <doc>
6435 <![CDATA[Returns an array type whose elements are all instances of
6436 {@code componentType}.
6437
6438 @return a {@link java.io.Serializable serializable} generic array type.]]>
6439 </doc>
6440 </method>
6441 <method name="subtypeOf" return="java.lang.reflect.WildcardType"
6442 abstract="false" native="false" synchronized="false"
6443 static="true" final="false" visibility="public"
6444 deprecated="not deprecated">
6445 <param name="bound" type="java.lang.reflect.Type"/>
6446 <doc>
6447 <![CDATA[Returns a type that represents an unknown type that extends {@code bound}.
6448 For example, if {@code bound} is {@code CharSequence.class}, this returns
6449 {@code ? extends CharSequence}. If {@code bound} is {@code Object.class},
6450 this returns {@code ?}, which is shorthand for {@code ? extends Object}.]]>
6451 </doc>
6452 </method>
6453 <method name="supertypeOf" return="java.lang.reflect.WildcardType"
6454 abstract="false" native="false" synchronized="false"
6455 static="true" final="false" visibility="public"
6456 deprecated="not deprecated">
6457 <param name="bound" type="java.lang.reflect.Type"/>
6458 <doc>
6459 <![CDATA[Returns a type that represents an unknown supertype of {@code bound}. For
6460 example, if {@code bound} is {@code String.class}, this returns {@code ?
6461 super String}.]]>
6462 </doc>
6463 </method>
6464 <method name="listOf" return="java.lang.reflect.ParameterizedType"
6465 abstract="false" native="false" synchronized="false"
6466 static="true" final="false" visibility="public"
6467 deprecated="not deprecated">
6468 <param name="elementType" type="java.lang.reflect.Type"/>
6469 <doc>
6470 <![CDATA[Returns a type modelling a {@link List} whose elements are of type
6471 {@code elementType}.
6472
6473 @return a {@link java.io.Serializable serializable} parameterized type.]]>
6474 </doc>
6475 </method>
6476 <method name="setOf" return="java.lang.reflect.ParameterizedType"
6477 abstract="false" native="false" synchronized="false"
6478 static="true" final="false" visibility="public"
6479 deprecated="not deprecated">
6480 <param name="elementType" type="java.lang.reflect.Type"/>
6481 <doc>
6482 <![CDATA[Returns a type modelling a {@link Set} whose elements are of type
6483 {@code elementType}.
6484
6485 @return a {@link java.io.Serializable serializable} parameterized type.]]>
6486 </doc>
6487 </method>
6488 <method name="mapOf" return="java.lang.reflect.ParameterizedType"
6489 abstract="false" native="false" synchronized="false"
6490 static="true" final="false" visibility="public"
6491 deprecated="not deprecated">
6492 <param name="keyType" type="java.lang.reflect.Type"/>
6493 <param name="valueType" type="java.lang.reflect.Type"/>
6494 <doc>
6495 <![CDATA[Returns a type modelling a {@link Map} whose keys are of type
6496 {@code keyType} and whose values are of type {@code valueType}.
6497
6498 @return a {@link java.io.Serializable serializable} parameterized type.]]>
6499 </doc>
6500 </method>
6501 <method name="providerOf" return="java.lang.reflect.ParameterizedType"
6502 abstract="false" native="false" synchronized="false"
6503 static="true" final="false" visibility="public"
6504 deprecated="not deprecated">
6505 <param name="providedType" type="java.lang.reflect.Type"/>
6506 <doc>
6507 <![CDATA[Returns a type modelling a {@link Provider} that provides elements of type
6508 {@code elementType}.
6509
6510 @return a {@link java.io.Serializable serializable} parameterized type.]]>
6511 </doc>
6512 </method>
6513 <doc>
6514 <![CDATA[Static methods for working with types.
6515
6516 @author crazybob@google.com (Bob Lee)
6517 @since 2.0]]>
6518 </doc>
6519 </class>
6520 <!-- end class com.google.inject.util.Types -->
6521</package>
6522
6523</api>