blob: f22794680271fd0d54ee3b884d3528dd79b9ff78 [file] [log] [blame]
sberlin@gmail.com42fef492010-10-31 20:13:24 +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 Sun Oct 31 16:13:18 EDT 2010 -->
5
6<api
7 xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
8 xsi:noNamespaceSchemaLocation='api.xsd'
9 name="3.0"
10 jdversion="1.1.1">
11
12<!-- Command line arguments = -doclet jdiff.JDiff -docletpath C:\Documents and Settings\Sam Berlin\workspace\guice\lib\build\jdiff\jdiff.jar;C:\Documents and Settings\Sam Berlin\workspace\guice\lib\build\jdiff\xerces.jar -classpath C:\Documents and Settings\Sam Berlin\workspace\guice\lib\javax.inject.jar;C:\Documents and Settings\Sam Berlin\workspace\guice\lib\aopalliance.jar -apidir build/docs/latest-api-diffs -apiname 3.0 -->
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 provider 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 <pre>
729 Constructor<T> loneCtor = getLoneCtorFromServiceImplViaReflection();
730 bind(ServiceImpl.class)
731 .toConstructor(loneCtor);</pre>
732
733 In this example, we directly tell Guice which constructor to use in a concrete
734 class implementation. It means that we do not need to place {@literal @}Inject
735 on any of the constructors and that Guice treats the provided constructor as though
736 it were annotated so. It is useful for cases where you cannot modify existing
737 classes and is a bit simpler than using a {@link Provider}.
738
739 <p>The above list of examples is far from exhaustive. If you can think of
740 how the concepts of one example might coexist with the concepts from another,
741 you can most likely weave the two together. If the two concepts make no
742 sense with each other, you most likely won't be able to do it. In a few
743 cases Guice will let something bogus slip by, and will then inform you of
744 the problems at runtime, as soon as you try to create your Injector.
745
746 <p>The other methods of Binder such as {@link #bindScope},
747 {@link #bindInterceptor}, {@link #install}, {@link #requestStaticInjection},
748 {@link #addError} and {@link #currentStage} are not part of the Binding EDSL;
749 you can learn how to use these in the usual way, from the method
750 documentation.
751
752 @author crazybob@google.com (Bob Lee)
753 @author jessewilson@google.com (Jesse Wilson)
754 @author kevinb@google.com (Kevin Bourrillion)]]>
755 </doc>
756 </interface>
757 <!-- end interface com.google.inject.Binder -->
758 <!-- start interface com.google.inject.Binding -->
759 <interface name="Binding" abstract="true"
760 static="false" final="false" visibility="public"
761 deprecated="not deprecated">
762 <implements name="com.google.inject.spi.Element"/>
763 <method name="getKey" return="com.google.inject.Key&lt;T&gt;"
764 abstract="false" native="false" synchronized="false"
765 static="false" final="false" visibility="public"
766 deprecated="not deprecated">
767 <doc>
768 <![CDATA[Returns the key for this binding.]]>
769 </doc>
770 </method>
771 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
772 abstract="false" native="false" synchronized="false"
773 static="false" final="false" visibility="public"
774 deprecated="not deprecated">
775 <doc>
776 <![CDATA[Returns the scoped provider guice uses to fulfill requests for this
777 binding.
778
779 @throws UnsupportedOperationException when invoked on a {@link Binding}
780 created via {@link com.google.inject.spi.Elements#getElements}. This
781 method is only supported on {@link Binding}s returned from an injector.]]>
782 </doc>
783 </method>
784 <method name="acceptTargetVisitor" return="V"
785 abstract="false" native="false" synchronized="false"
786 static="false" final="false" visibility="public"
787 deprecated="not deprecated">
788 <param name="visitor" type="com.google.inject.spi.BindingTargetVisitor&lt;? super T, V&gt;"/>
789 <doc>
790 <![CDATA[Accepts a target visitor. Invokes the visitor method specific to this binding's target.
791
792 @param visitor to call back on
793 @since 2.0]]>
794 </doc>
795 </method>
796 <method name="acceptScopingVisitor" return="V"
797 abstract="false" native="false" synchronized="false"
798 static="false" final="false" visibility="public"
799 deprecated="not deprecated">
800 <param name="visitor" type="com.google.inject.spi.BindingScopingVisitor&lt;V&gt;"/>
801 <doc>
802 <![CDATA[Accepts a scoping visitor. Invokes the visitor method specific to this binding's scoping.
803
804 @param visitor to call back on
805 @since 2.0]]>
806 </doc>
807 </method>
808 <doc>
809 <![CDATA[A mapping from a key (type and optional annotation) to the strategy for getting instances of the
810 type. This interface is part of the introspection API and is intended primarily for use by
811 tools.
812
813 <p>Bindings are created in several ways:
814 <ul>
815 <li>Explicitly in a module, via {@code bind()} and {@code bindConstant()}
816 statements:
817 <pre>
818 bind(Service.class).annotatedWith(Red.class).to(ServiceImpl.class);
819 bindConstant().annotatedWith(ServerHost.class).to(args[0]);</pre></li>
820 <li>Implicitly by the Injector by following a type's {@link ImplementedBy
821 pointer} {@link ProvidedBy annotations} or by using its {@link Inject annotated} or
822 default constructor.</li>
823 <li>By converting a bound instance to a different type.</li>
824 <li>For {@link Provider providers}, by delegating to the binding for the provided type.</li>
825 </ul>
826
827
828 <p>They exist on both modules and on injectors, and their behaviour is different for each:
829 <ul>
830 <li><strong>Module bindings</strong> are incomplete and cannot be used to provide instances.
831 This is because the applicable scopes and interceptors may not be known until an injector
832 is created. From a tool's perspective, module bindings are like the injector's source
833 code. They can be inspected or rewritten, but this analysis must be done statically.</li>
834 <li><strong>Injector bindings</strong> are complete and valid and can be used to provide
835 instances. From a tools' perspective, injector bindings are like reflection for an
836 injector. They have full runtime information, including the complete graph of injections
837 necessary to satisfy a binding.</li>
838 </ul>
839
840 @param <T> the bound type. The injected is always assignable to this type.
841
842 @author crazybob@google.com (Bob Lee)
843 @author jessewilson@google.com (Jesse Wilson)]]>
844 </doc>
845 </interface>
846 <!-- end interface com.google.inject.Binding -->
847 <!-- start class com.google.inject.BindingAnnotation -->
848 <class name="BindingAnnotation" abstract="true"
849 static="false" final="false" visibility="public"
850 deprecated="not deprecated">
851 <implements name="java.lang.annotation.Annotation"/>
852 <doc>
853 <![CDATA[Annotates annotations which are used for binding. Only one such annotation
854 may apply to a single injection point. You must also annotate binder
855 annotations with {@code @Retention(RUNTIME)}. For example:
856
857 <pre>
858 {@code @}Retention(RUNTIME)
859 {@code @}Target({ FIELD, PARAMETER, METHOD })
860 {@code @}BindingAnnotation
861 public {@code @}interface Transactional {}
862 </pre>
863
864 @author crazybob@google.com (Bob Lee)]]>
865 </doc>
866 </class>
867 <!-- end class com.google.inject.BindingAnnotation -->
868 <!-- start class com.google.inject.ConfigurationException -->
869 <class name="ConfigurationException" extends="java.lang.RuntimeException"
870 abstract="false"
871 static="false" final="true" visibility="public"
872 deprecated="not deprecated">
873 <constructor name="ConfigurationException" type="java.lang.Iterable&lt;com.google.inject.spi.Message&gt;"
874 static="false" final="false" visibility="public"
875 deprecated="not deprecated">
876 <doc>
877 <![CDATA[Creates a ConfigurationException containing {@code messages}.]]>
878 </doc>
879 </constructor>
880 <method name="withPartialValue" return="com.google.inject.ConfigurationException"
881 abstract="false" native="false" synchronized="false"
882 static="false" final="false" visibility="public"
883 deprecated="not deprecated">
884 <param name="partialValue" type="java.lang.Object"/>
885 <doc>
886 <![CDATA[Returns a copy of this configuration exception with the specified partial value.]]>
887 </doc>
888 </method>
889 <method name="getErrorMessages" return="java.util.Collection&lt;com.google.inject.spi.Message&gt;"
890 abstract="false" native="false" synchronized="false"
891 static="false" final="false" visibility="public"
892 deprecated="not deprecated">
893 <doc>
894 <![CDATA[Returns messages for the errors that caused this exception.]]>
895 </doc>
896 </method>
897 <method name="getPartialValue" return="E"
898 abstract="false" native="false" synchronized="false"
899 static="false" final="false" visibility="public"
900 deprecated="not deprecated">
901 <doc>
902 <![CDATA[Returns a value that was only partially computed due to this exception. The caller can use
903 this while collecting additional configuration problems.
904
905 @return the partial value, or {@code null} if none was set. The type of the partial value is
906 specified by the throwing method.]]>
907 </doc>
908 </method>
909 <method name="getMessage" return="java.lang.String"
910 abstract="false" native="false" synchronized="false"
911 static="false" final="false" visibility="public"
912 deprecated="not deprecated">
913 </method>
914 <doc>
915 <![CDATA[Thrown when a programming error such as a misplaced annotation, illegal binding, or unsupported
916 scope is found. Clients should catch this exception, log it, and stop execution.
917
918 @author jessewilson@google.com (Jesse Wilson)
919 @since 2.0]]>
920 </doc>
921 </class>
922 <!-- end class com.google.inject.ConfigurationException -->
923 <!-- start class com.google.inject.CreationException -->
924 <class name="CreationException" extends="java.lang.RuntimeException"
925 abstract="false"
926 static="false" final="false" visibility="public"
927 deprecated="not deprecated">
928 <constructor name="CreationException" type="java.util.Collection&lt;com.google.inject.spi.Message&gt;"
929 static="false" final="false" visibility="public"
930 deprecated="not deprecated">
931 <doc>
932 <![CDATA[Creates a CreationException containing {@code messages}.]]>
933 </doc>
934 </constructor>
935 <method name="getErrorMessages" return="java.util.Collection&lt;com.google.inject.spi.Message&gt;"
936 abstract="false" native="false" synchronized="false"
937 static="false" final="false" visibility="public"
938 deprecated="not deprecated">
939 <doc>
940 <![CDATA[Returns messages for the errors that caused this exception.]]>
941 </doc>
942 </method>
943 <method name="getMessage" return="java.lang.String"
944 abstract="false" native="false" synchronized="false"
945 static="false" final="false" visibility="public"
946 deprecated="not deprecated">
947 </method>
948 <doc>
949 <![CDATA[Thrown when errors occur while creating a {@link Injector}. Includes a list of encountered
950 errors. Clients should catch this exception, log it, and stop execution.
951
952 @author crazybob@google.com (Bob Lee)]]>
953 </doc>
954 </class>
955 <!-- end class com.google.inject.CreationException -->
956 <!-- start class com.google.inject.Exposed -->
957 <class name="Exposed" abstract="true"
958 static="false" final="false" visibility="public"
959 deprecated="not deprecated">
960 <implements name="java.lang.annotation.Annotation"/>
961 <doc>
962 <![CDATA[Acccompanies a {@literal @}{@link com.google.inject.Provides Provides} method annotation in a
963 private module to indicate that the provided binding is exposed.
964
965 @author jessewilson@google.com (Jesse Wilson)
966 @since 2.0]]>
967 </doc>
968 </class>
969 <!-- end class com.google.inject.Exposed -->
970 <!-- start class com.google.inject.Guice -->
971 <class name="Guice" extends="java.lang.Object"
972 abstract="false"
973 static="false" final="true" visibility="public"
974 deprecated="not deprecated">
975 <method name="createInjector" return="com.google.inject.Injector"
976 abstract="false" native="false" synchronized="false"
977 static="true" final="false" visibility="public"
978 deprecated="not deprecated">
979 <param name="modules" type="com.google.inject.Module[]"/>
980 <doc>
981 <![CDATA[Creates an injector for the given set of modules. To create an injector
982 with a {@link Stage} or other options, see {@link InjectorBuilder}.
983
984 @throws CreationException if one or more errors occur during injector
985 construction]]>
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="modules" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
993 <doc>
994 <![CDATA[Creates an injector for the given set of modules. To create an injector
995 with a {@link Stage} or other options, see {@link InjectorBuilder}.
996
997 @throws CreationException if one or more errors occur during injector
998 creation]]>
999 </doc>
1000 </method>
1001 <method name="createInjector" return="com.google.inject.Injector"
1002 abstract="false" native="false" synchronized="false"
1003 static="true" final="false" visibility="public"
1004 deprecated="not deprecated">
1005 <param name="stage" type="com.google.inject.Stage"/>
1006 <param name="modules" type="com.google.inject.Module[]"/>
1007 <doc>
1008 <![CDATA[Creates an injector for the given set of modules, in a given development
1009 stage. Use {@link InjectorBuilder} for advanced injector creation.
1010
1011 @throws CreationException if one or more errors occur during injector
1012 creation.]]>
1013 </doc>
1014 </method>
1015 <method name="createInjector" return="com.google.inject.Injector"
1016 abstract="false" native="false" synchronized="false"
1017 static="true" final="false" visibility="public"
1018 deprecated="not deprecated">
1019 <param name="stage" type="com.google.inject.Stage"/>
1020 <param name="modules" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
1021 <doc>
1022 <![CDATA[Creates an injector for the given set of modules, in a given development
1023 stage. Use {@link InjectorBuilder} for advanced injector creation.
1024
1025 @throws CreationException if one or more errors occur during injector
1026 construction]]>
1027 </doc>
1028 </method>
1029 <doc>
1030 <![CDATA[The entry point to the Guice framework. Creates {@link Injector}s from
1031 {@link Module}s. For advanced usage, see {@link InjectorBuilder}.
1032
1033 <p>Guice supports a model of development that draws clear boundaries between
1034 APIs, Implementations of these APIs, Modules which configure these
1035 implementations, and finally Applications which consist of a collection of
1036 Modules. It is the Application, which typically defines your {@code main()}
1037 method, that bootstraps the Guice Injector using the {@code Guice} class, as
1038 in this example:
1039 <pre>
1040 public class FooApplication {
1041 public static void main(String[] args) {
1042 Injector injector = Guice.createInjector(
1043 new ModuleA(),
1044 new ModuleB(),
1045 . . .
1046 new FooApplicationFlagsModule(args)
1047 );
1048
1049 // Now just bootstrap the application and you're done
1050 FooStarter starter = injector.getInstance(FooStarter.class);
1051 starter.runApplication();
1052 }
1053 }
1054 </pre>]]>
1055 </doc>
1056 </class>
1057 <!-- end class com.google.inject.Guice -->
1058 <!-- start class com.google.inject.ImplementedBy -->
1059 <class name="ImplementedBy" abstract="true"
1060 static="false" final="false" visibility="public"
1061 deprecated="not deprecated">
1062 <implements name="java.lang.annotation.Annotation"/>
1063 <doc>
1064 <![CDATA[A pointer to the default implementation of a type.
1065
1066 @author crazybob@google.com (Bob Lee)]]>
1067 </doc>
1068 </class>
1069 <!-- end class com.google.inject.ImplementedBy -->
1070 <!-- start class com.google.inject.Inject -->
1071 <class name="Inject" abstract="true"
1072 static="false" final="false" visibility="public"
1073 deprecated="not deprecated">
1074 <implements name="java.lang.annotation.Annotation"/>
1075 <doc>
1076 <![CDATA[Annotates members of your implementation class (constructors, methods
1077 and fields) into which the {@link Injector} should inject values.
1078 The Injector fulfills injection requests for:
1079
1080 <ul>
1081 <li>Every instance it constructs. The class being constructed must have
1082 exactly one of its constructors marked with {@code @Inject} or must have a
1083 constructor taking no parameters. The Injector then proceeds to perform
1084 method and field injections.
1085
1086 <li>Pre-constructed instances passed to {@link Injector#injectMembers},
1087 {@link com.google.inject.binder.LinkedBindingBuilder#toInstance(Object)} and
1088 {@link com.google.inject.binder.LinkedBindingBuilder#toProvider(Provider)}.
1089 In this case all constructors are, of course, ignored.
1090
1091 <li>Static fields and methods of classes which any {@link Module} has
1092 specifically requested static injection for, using
1093 {@link Binder#requestStaticInjection}.
1094 </ul>
1095
1096 In all cases, a member can be injected regardless of its Java access
1097 specifier (private, default, protected, public).
1098
1099 @author crazybob@google.com (Bob Lee)]]>
1100 </doc>
1101 </class>
1102 <!-- end class com.google.inject.Inject -->
1103 <!-- start interface com.google.inject.Injector -->
1104 <interface name="Injector" abstract="true"
1105 static="false" final="false" visibility="public"
1106 deprecated="not deprecated">
1107 <method name="injectMembers"
1108 abstract="false" native="false" synchronized="false"
1109 static="false" final="false" visibility="public"
1110 deprecated="not deprecated">
1111 <param name="instance" type="java.lang.Object"/>
1112 <doc>
1113 <![CDATA[Injects dependencies into the fields and methods of {@code instance}. Ignores the presence or
1114 absence of an injectable constructor.
1115
1116 <p>Whenever Guice creates an instance, it performs this injection automatically (after first
1117 performing constructor injection), so if you're able to let Guice create all your objects for
1118 you, you'll never need to use this method.
1119
1120 @param instance to inject members on
1121
1122 @see Binder#getMembersInjector(Class) for a preferred alternative that supports checks before
1123 run time]]>
1124 </doc>
1125 </method>
1126 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
1127 abstract="false" native="false" synchronized="false"
1128 static="false" final="false" visibility="public"
1129 deprecated="not deprecated">
1130 <param name="typeLiteral" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
1131 <doc>
1132 <![CDATA[Returns the members injector used to inject dependencies into methods and fields on instances
1133 of the given type {@code T}.
1134
1135 @param typeLiteral type to get members injector for
1136 @see Binder#getMembersInjector(TypeLiteral) for an alternative that offers up front error
1137 detection
1138 @since 2.0]]>
1139 </doc>
1140 </method>
1141 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
1142 abstract="false" native="false" synchronized="false"
1143 static="false" final="false" visibility="public"
1144 deprecated="not deprecated">
1145 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1146 <doc>
1147 <![CDATA[Returns the members injector used to inject dependencies into methods and fields on instances
1148 of the given type {@code T}. When feasible, use {@link Binder#getMembersInjector(TypeLiteral)}
1149 instead to get increased up front error detection.
1150
1151 @param type type to get members injector for
1152 @see Binder#getMembersInjector(Class) for an alternative that offers up front error
1153 detection
1154 @since 2.0]]>
1155 </doc>
1156 </method>
1157 <method name="getBindings" return="java.util.Map&lt;com.google.inject.Key&lt;?&gt;, com.google.inject.Binding&lt;?&gt;&gt;"
1158 abstract="false" native="false" synchronized="false"
1159 static="false" final="false" visibility="public"
1160 deprecated="not deprecated">
1161 <doc>
1162 <![CDATA[Returns this injector's <strong>explicit</strong> bindings.
1163
1164 <p>The returned map does not include bindings inherited from a {@link #getParent() parent
1165 injector}, should one exist. The returned map is guaranteed to iterate (for example, with
1166 its {@link Map#entrySet()} iterator) in the order of insertion. In other words, the order in
1167 which bindings appear in user Modules.
1168
1169 <p>This method is part of the Guice SPI and is intended for use by tools and extensions.]]>
1170 </doc>
1171 </method>
1172 <method name="getAllBindings" return="java.util.Map&lt;com.google.inject.Key&lt;?&gt;, com.google.inject.Binding&lt;?&gt;&gt;"
1173 abstract="false" native="false" synchronized="false"
1174 static="false" final="false" visibility="public"
1175 deprecated="not deprecated">
1176 <doc>
1177 <![CDATA[Returns a snapshot of this injector's bindings, <strong>both explicit and
1178 just-in-time</strong>. The returned map is immutable; it contains only the bindings that were
1179 present when {@code getAllBindings()} was invoked. Subsequent calls may return a map with
1180 additional just-in-time bindings.
1181
1182 <p>The returned map does not include bindings inherited from a {@link #getParent() parent
1183 injector}, should one exist.
1184
1185 <p>This method is part of the Guice SPI and is intended for use by tools and extensions.
1186
1187 @since 3.0]]>
1188 </doc>
1189 </method>
1190 <method name="getBinding" return="com.google.inject.Binding&lt;T&gt;"
1191 abstract="false" native="false" synchronized="false"
1192 static="false" final="false" visibility="public"
1193 deprecated="not deprecated">
1194 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
1195 <doc>
1196 <![CDATA[Returns the binding for the given injection key. This will be an explicit bindings if the key
1197 was bound explicitly by a module, or an implicit binding otherwise. The implicit binding will
1198 be created if necessary.
1199
1200 <p>This method is part of the Guice SPI and is intended for use by tools and extensions.
1201
1202 @throws ConfigurationException if this injector cannot find or create the binding.]]>
1203 </doc>
1204 </method>
1205 <method name="getBinding" return="com.google.inject.Binding&lt;T&gt;"
1206 abstract="false" native="false" synchronized="false"
1207 static="false" final="false" visibility="public"
1208 deprecated="not deprecated">
1209 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1210 <doc>
1211 <![CDATA[Returns the binding for the given type. This will be an explicit bindings if the injection key
1212 was bound explicitly by a module, or an implicit binding otherwise. The implicit binding will
1213 be created if necessary.
1214
1215 <p>This method is part of the Guice SPI and is intended for use by tools and extensions.
1216
1217 @throws ConfigurationException if this injector cannot find or create the binding.
1218 @since 2.0]]>
1219 </doc>
1220 </method>
1221 <method name="getExistingBinding" return="com.google.inject.Binding&lt;T&gt;"
1222 abstract="false" native="false" synchronized="false"
1223 static="false" final="false" visibility="public"
1224 deprecated="not deprecated">
1225 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
1226 <doc>
1227 <![CDATA[Returns the binding if it already exists, or null if does not exist. Unlike
1228 {@link #getBinding(Key)}, this does not attempt to create just-in-time bindings
1229 for keys that aren't bound.
1230
1231 <p> This method is part of the Guice SPI and is intended for use by tools and extensions.
1232
1233 @since 3.0]]>
1234 </doc>
1235 </method>
1236 <method name="findBindingsByType" return="java.util.List&lt;com.google.inject.Binding&lt;T&gt;&gt;"
1237 abstract="false" native="false" synchronized="false"
1238 static="false" final="false" visibility="public"
1239 deprecated="not deprecated">
1240 <param name="type" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
1241 <doc>
1242 <![CDATA[Returns all explicit bindings for {@code type}.
1243
1244 <p>This method is part of the Guice SPI and is intended for use by tools and extensions.]]>
1245 </doc>
1246 </method>
1247 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
1248 abstract="false" native="false" synchronized="false"
1249 static="false" final="false" visibility="public"
1250 deprecated="not deprecated">
1251 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
1252 <doc>
1253 <![CDATA[Returns the provider used to obtain instances for the given injection key. When feasible, avoid
1254 using this method, in favor of having Guice inject your dependencies ahead of time.
1255
1256 @throws ConfigurationException if this injector cannot find or create the provider.
1257 @see Binder#getProvider(Key) for an alternative that offers up front error detection]]>
1258 </doc>
1259 </method>
1260 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
1261 abstract="false" native="false" synchronized="false"
1262 static="false" final="false" visibility="public"
1263 deprecated="not deprecated">
1264 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1265 <doc>
1266 <![CDATA[Returns the provider used to obtain instances for the given type. When feasible, avoid
1267 using this method, in favor of having Guice inject your dependencies ahead of time.
1268
1269 @throws ConfigurationException if this injector cannot find or create the provider.
1270 @see Binder#getProvider(Class) for an alternative that offers up front error detection]]>
1271 </doc>
1272 </method>
1273 <method name="getInstance" return="T"
1274 abstract="false" native="false" synchronized="false"
1275 static="false" final="false" visibility="public"
1276 deprecated="not deprecated">
1277 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
1278 <doc>
1279 <![CDATA[Returns the appropriate instance for the given injection key; equivalent to {@code
1280 getProvider(key).get()}. When feasible, avoid using this method, in favor of having Guice
1281 inject your dependencies ahead of time.
1282
1283 @throws ConfigurationException if this injector cannot find or create the provider.
1284 @throws ProvisionException if there was a runtime failure while providing an instance.]]>
1285 </doc>
1286 </method>
1287 <method name="getInstance" return="T"
1288 abstract="false" native="false" synchronized="false"
1289 static="false" final="false" visibility="public"
1290 deprecated="not deprecated">
1291 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1292 <doc>
1293 <![CDATA[Returns the appropriate instance for the given injection type; equivalent to {@code
1294 getProvider(type).get()}. When feasible, avoid using this method, in favor of having Guice
1295 inject your dependencies ahead of time.
1296
1297 @throws ConfigurationException if this injector cannot find or create the provider.
1298 @throws ProvisionException if there was a runtime failure while providing an instance.]]>
1299 </doc>
1300 </method>
1301 <method name="getParent" return="com.google.inject.Injector"
1302 abstract="false" native="false" synchronized="false"
1303 static="false" final="false" visibility="public"
1304 deprecated="not deprecated">
1305 <doc>
1306 <![CDATA[Returns this injector's parent, or {@code null} if this is a top-level injector.
1307
1308 @since 2.0]]>
1309 </doc>
1310 </method>
1311 <method name="createChildInjector" return="com.google.inject.Injector"
1312 abstract="false" native="false" synchronized="false"
1313 static="false" final="false" visibility="public"
1314 deprecated="not deprecated">
1315 <param name="modules" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
1316 <doc>
1317 <![CDATA[Returns a new injector that inherits all state from this injector. All bindings, scopes,
1318 interceptors and type converters are inherited -- they are visible to the child injector.
1319 Elements of the child injector are not visible to its parent.
1320
1321 <p>Just-in-time bindings created for child injectors will be created in an ancestor injector
1322 whenever possible. This allows for scoped instances to be shared between injectors. Use
1323 explicit bindings to prevent bindings from being shared with the parent injector.
1324
1325 <p>No key may be bound by both an injector and one of its ancestors. This includes just-in-time
1326 bindings. The lone exception is the key for {@code Injector.class}, which is bound by each
1327 injector to itself.
1328
1329 @since 2.0]]>
1330 </doc>
1331 </method>
1332 <method name="createChildInjector" return="com.google.inject.Injector"
1333 abstract="false" native="false" synchronized="false"
1334 static="false" final="false" visibility="public"
1335 deprecated="not deprecated">
1336 <param name="modules" type="com.google.inject.Module[]"/>
1337 <doc>
1338 <![CDATA[Returns a new injector that inherits all state from this injector. All bindings, scopes,
1339 interceptors and type converters are inherited -- they are visible to the child injector.
1340 Elements of the child injector are not visible to its parent.
1341
1342 <p>Just-in-time bindings created for child injectors will be created in an ancestor injector
1343 whenever possible. This allows for scoped instances to be shared between injectors. Use
1344 explicit bindings to prevent bindings from being shared with the parent injector.
1345
1346 <p>No key may be bound by both an injector and one of its ancestors. This includes just-in-time
1347 bindings. The lone exception is the key for {@code Injector.class}, which is bound by each
1348 injector to itself.
1349
1350 @since 2.0]]>
1351 </doc>
1352 </method>
1353 <method name="getScopeBindings" return="java.util.Map&lt;java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;, com.google.inject.Scope&gt;"
1354 abstract="false" native="false" synchronized="false"
1355 static="false" final="false" visibility="public"
1356 deprecated="not deprecated">
1357 <doc>
1358 <![CDATA[Returns a map containing all scopes in the injector. The maps keys are scoping annotations
1359 like {@code Singleton.class}, and the values are scope instances, such as {@code
1360 Scopes.SINGLETON}. The returned map is immutable.
1361
1362 <p>This method is part of the Guice SPI and is intended for use by tools and extensions.
1363
1364 @since 3.0]]>
1365 </doc>
1366 </method>
1367 <doc>
1368 <![CDATA[Builds the graphs of objects that make up your application. The injector tracks the dependencies
1369 for each type and uses bindings to inject them. This is the core of Guice, although you rarely
1370 interact with it directly. This "behind-the-scenes" operation is what distinguishes dependency
1371 injection from its cousin, the service locator pattern.
1372
1373 <p>Contains several default bindings:
1374
1375 <ul>
1376 <li>This {@link Injector} instance itself
1377 <li>A {@code Provider<T>} for each binding of type {@code T}
1378 <li>The {@link java.util.logging.Logger} for the class being injected
1379 <li>The {@link Stage} in which the Injector was created
1380 </ul>
1381
1382 Injectors are created using the facade class {@link Guice}.
1383
1384 <p>An injector can also {@link #injectMembers(Object) inject the dependencies} of
1385 already-constructed instances. This can be used to interoperate with objects created by other
1386 frameworks or services.
1387
1388 <p>Injectors can be {@link #createChildInjector(Iterable) hierarchical}. Child injectors inherit
1389 the configuration of their parent injectors, but the converse does not hold.
1390
1391 <p>The injector's {@link #getBindings() internal bindings} are available for introspection. This
1392 enables tools and extensions to operate on an injector reflectively.
1393
1394 @author crazybob@google.com (Bob Lee)
1395 @author jessewilson@google.com (Jesse Wilson)]]>
1396 </doc>
1397 </interface>
1398 <!-- end interface com.google.inject.Injector -->
1399 <!-- start class com.google.inject.InjectorBuilder -->
1400 <class name="InjectorBuilder" extends="java.lang.Object"
1401 abstract="false"
1402 static="false" final="false" visibility="public"
1403 deprecated="not deprecated">
1404 <constructor name="InjectorBuilder"
1405 static="false" final="false" visibility="public"
1406 deprecated="not deprecated">
1407 </constructor>
1408 <method name="stage" return="com.google.inject.InjectorBuilder"
1409 abstract="false" native="false" synchronized="false"
1410 static="false" final="false" visibility="public"
1411 deprecated="not deprecated">
1412 <param name="stage" type="com.google.inject.Stage"/>
1413 <doc>
1414 <![CDATA[Sets the stage for the injector. If the stage is {@link Stage#PRODUCTION},
1415 singletons will be eagerly loaded when the Injector is built.]]>
1416 </doc>
1417 </method>
1418 <method name="requireExplicitBindings" return="com.google.inject.InjectorBuilder"
1419 abstract="false" native="false" synchronized="false"
1420 static="false" final="false" visibility="public"
1421 deprecated="not deprecated">
1422 <doc>
1423 <![CDATA[If explicit bindings are required, then classes that are not explicitly
1424 bound in a module cannot be injected. Bindings created through a linked
1425 binding (<code>bind(Foo.class).to(FooImpl.class)</code>) are allowed, but
1426 the implicit binding (FooImpl) cannot be directly injected unless it is
1427 also explicitly bound.
1428
1429 Tools can still retrieve bindings for implicit bindings (bindings created
1430 through a linked binding) if explicit bindings are required, however
1431 {@link Binding#getProvider} cannot be used.
1432
1433 By default, explicit bindings are not required.]]>
1434 </doc>
1435 </method>
1436 <method name="disableCircularProxies" return="com.google.inject.InjectorBuilder"
1437 abstract="false" native="false" synchronized="false"
1438 static="false" final="false" visibility="public"
1439 deprecated="not deprecated">
1440 <doc>
1441 <![CDATA[Prevents Guice from constructing a {@link Proxy} when a circular dependency
1442 is found.]]>
1443 </doc>
1444 </method>
1445 <method name="addModules" return="com.google.inject.InjectorBuilder"
1446 abstract="false" native="false" synchronized="false"
1447 static="false" final="false" visibility="public"
1448 deprecated="not deprecated">
1449 <param name="modules" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
1450 <doc>
1451 <![CDATA[Adds more modules that will be used when the Injector is created.]]>
1452 </doc>
1453 </method>
1454 <method name="addModules" return="com.google.inject.InjectorBuilder"
1455 abstract="false" native="false" synchronized="false"
1456 static="false" final="false" visibility="public"
1457 deprecated="not deprecated">
1458 <param name="modules" type="com.google.inject.Module[]"/>
1459 <doc>
1460 <![CDATA[Adds more modules that will be used when the Injector is created.]]>
1461 </doc>
1462 </method>
1463 <method name="build" return="com.google.inject.Injector"
1464 abstract="false" native="false" synchronized="false"
1465 static="false" final="false" visibility="public"
1466 deprecated="not deprecated">
1467 <doc>
1468 <![CDATA[Builds the injector.]]>
1469 </doc>
1470 </method>
1471 <doc>
1472 <![CDATA[The advanced entry point to the Guice framework. Creates {@link Injector}s from
1473 {@link Module}s, allowing many options to be configured for the Injector.
1474
1475 <p>Guice supports a model of development that draws clear boundaries between
1476 APIs, Implementations of these APIs, Modules which configure these
1477 implementations, and finally Applications which consist of a collection of
1478 Modules. It is the Application, which typically defines your {@code main()}
1479 method, that bootstraps the Guice Injector using the {@code Guice} class, as
1480 in this example:
1481 <pre>
1482 public class FooApplication {
1483 public static void main(String[] args) {
1484 Injector injector = new InjectorBuilder().
1485 .stage(Stage.PRODUCTION)
1486 . . .
1487 .addModules(
1488 new ModuleA(),
1489 new ModuleB(),
1490 . . .
1491 new FooApplicationFlagsModule(args)
1492 )
1493 .build();
1494 );
1495
1496 // Now just bootstrap the application and you're done
1497 FooStarter starter = injector.getInstance(FooStarter.class);
1498 starter.runApplication();
1499 }
1500 }
1501 </pre>
1502
1503 @since 3.0]]>
1504 </doc>
1505 </class>
1506 <!-- end class com.google.inject.InjectorBuilder -->
1507 <!-- start class com.google.inject.Key -->
1508 <class name="Key" extends="java.lang.Object"
1509 abstract="false"
1510 static="false" final="false" visibility="public"
1511 deprecated="not deprecated">
1512 <constructor name="Key" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"
1513 static="false" final="false" visibility="protected"
1514 deprecated="not deprecated">
1515 <doc>
1516 <![CDATA[Constructs a new key. Derives the type from this class's type parameter.
1517
1518 <p>Clients create an empty anonymous subclass. Doing so embeds the type
1519 parameter in the anonymous class's type hierarchy so we can reconstitute it
1520 at runtime despite erasure.
1521
1522 <p>Example usage for a binding of type {@code Foo} annotated with
1523 {@code @Bar}:
1524
1525 <p>{@code new Key<Foo>(Bar.class) {}}.]]>
1526 </doc>
1527 </constructor>
1528 <constructor name="Key" type="java.lang.annotation.Annotation"
1529 static="false" final="false" visibility="protected"
1530 deprecated="not deprecated">
1531 <doc>
1532 <![CDATA[Constructs a new key. Derives the type from this class's type parameter.
1533
1534 <p>Clients create an empty anonymous subclass. Doing so embeds the type
1535 parameter in the anonymous class's type hierarchy so we can reconstitute it
1536 at runtime despite erasure.
1537
1538 <p>Example usage for a binding of type {@code Foo} annotated with
1539 {@code @Bar}:
1540
1541 <p>{@code new Key<Foo>(new Bar()) {}}.]]>
1542 </doc>
1543 </constructor>
1544 <constructor name="Key"
1545 static="false" final="false" visibility="protected"
1546 deprecated="not deprecated">
1547 <doc>
1548 <![CDATA[Constructs a new key. Derives the type from this class's type parameter.
1549
1550 <p>Clients create an empty anonymous subclass. Doing so embeds the type
1551 parameter in the anonymous class's type hierarchy so we can reconstitute it
1552 at runtime despite erasure.
1553
1554 <p>Example usage for a binding of type {@code Foo}:
1555
1556 <p>{@code new Key<Foo>() {}}.]]>
1557 </doc>
1558 </constructor>
1559 <method name="getTypeLiteral" return="com.google.inject.TypeLiteral&lt;T&gt;"
1560 abstract="false" native="false" synchronized="false"
1561 static="false" final="true" visibility="public"
1562 deprecated="not deprecated">
1563 <doc>
1564 <![CDATA[Gets the key type.]]>
1565 </doc>
1566 </method>
1567 <method name="getAnnotationType" return="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"
1568 abstract="false" native="false" synchronized="false"
1569 static="false" final="true" visibility="public"
1570 deprecated="not deprecated">
1571 <doc>
1572 <![CDATA[Gets the annotation type.]]>
1573 </doc>
1574 </method>
1575 <method name="getAnnotation" return="java.lang.annotation.Annotation"
1576 abstract="false" native="false" synchronized="false"
1577 static="false" final="true" visibility="public"
1578 deprecated="not deprecated">
1579 <doc>
1580 <![CDATA[Gets the annotation.]]>
1581 </doc>
1582 </method>
1583 <method name="equals" return="boolean"
1584 abstract="false" native="false" synchronized="false"
1585 static="false" final="true" visibility="public"
1586 deprecated="not deprecated">
1587 <param name="o" type="java.lang.Object"/>
1588 </method>
1589 <method name="hashCode" return="int"
1590 abstract="false" native="false" synchronized="false"
1591 static="false" final="true" visibility="public"
1592 deprecated="not deprecated">
1593 </method>
1594 <method name="toString" return="java.lang.String"
1595 abstract="false" native="false" synchronized="false"
1596 static="false" final="true" visibility="public"
1597 deprecated="not deprecated">
1598 </method>
1599 <method name="get" return="com.google.inject.Key&lt;T&gt;"
1600 abstract="false" native="false" synchronized="false"
1601 static="true" final="false" visibility="public"
1602 deprecated="not deprecated">
1603 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1604 <doc>
1605 <![CDATA[Gets a key for an injection type.]]>
1606 </doc>
1607 </method>
1608 <method name="get" return="com.google.inject.Key&lt;T&gt;"
1609 abstract="false" native="false" synchronized="false"
1610 static="true" final="false" visibility="public"
1611 deprecated="not deprecated">
1612 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1613 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
1614 <doc>
1615 <![CDATA[Gets a key for an injection type and an annotation type.]]>
1616 </doc>
1617 </method>
1618 <method name="get" return="com.google.inject.Key&lt;T&gt;"
1619 abstract="false" native="false" synchronized="false"
1620 static="true" final="false" visibility="public"
1621 deprecated="not deprecated">
1622 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1623 <param name="annotation" type="java.lang.annotation.Annotation"/>
1624 <doc>
1625 <![CDATA[Gets a key for an injection type and an annotation.]]>
1626 </doc>
1627 </method>
1628 <method name="get" return="com.google.inject.Key&lt;?&gt;"
1629 abstract="false" native="false" synchronized="false"
1630 static="true" final="false" visibility="public"
1631 deprecated="not deprecated">
1632 <param name="type" type="java.lang.reflect.Type"/>
1633 <doc>
1634 <![CDATA[Gets a key for an injection type.]]>
1635 </doc>
1636 </method>
1637 <method name="get" return="com.google.inject.Key&lt;?&gt;"
1638 abstract="false" native="false" synchronized="false"
1639 static="true" final="false" visibility="public"
1640 deprecated="not deprecated">
1641 <param name="type" type="java.lang.reflect.Type"/>
1642 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
1643 <doc>
1644 <![CDATA[Gets a key for an injection type and an annotation type.]]>
1645 </doc>
1646 </method>
1647 <method name="get" return="com.google.inject.Key&lt;?&gt;"
1648 abstract="false" native="false" synchronized="false"
1649 static="true" final="false" visibility="public"
1650 deprecated="not deprecated">
1651 <param name="type" type="java.lang.reflect.Type"/>
1652 <param name="annotation" type="java.lang.annotation.Annotation"/>
1653 <doc>
1654 <![CDATA[Gets a key for an injection type and an annotation.]]>
1655 </doc>
1656 </method>
1657 <method name="get" return="com.google.inject.Key&lt;T&gt;"
1658 abstract="false" native="false" synchronized="false"
1659 static="true" final="false" visibility="public"
1660 deprecated="not deprecated">
1661 <param name="typeLiteral" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
1662 <doc>
1663 <![CDATA[Gets a key for an injection type.]]>
1664 </doc>
1665 </method>
1666 <method name="get" return="com.google.inject.Key&lt;T&gt;"
1667 abstract="false" native="false" synchronized="false"
1668 static="true" final="false" visibility="public"
1669 deprecated="not deprecated">
1670 <param name="typeLiteral" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
1671 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
1672 <doc>
1673 <![CDATA[Gets a key for an injection type and an annotation type.]]>
1674 </doc>
1675 </method>
1676 <method name="get" return="com.google.inject.Key&lt;T&gt;"
1677 abstract="false" native="false" synchronized="false"
1678 static="true" final="false" visibility="public"
1679 deprecated="not deprecated">
1680 <param name="typeLiteral" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
1681 <param name="annotation" type="java.lang.annotation.Annotation"/>
1682 <doc>
1683 <![CDATA[Gets a key for an injection type and an annotation.]]>
1684 </doc>
1685 </method>
1686 <method name="ofType" return="com.google.inject.Key&lt;T&gt;"
1687 abstract="false" native="false" synchronized="false"
1688 static="false" final="false" visibility="public"
1689 deprecated="not deprecated">
1690 <param name="type" type="java.lang.Class&lt;T&gt;"/>
1691 <doc>
1692 <![CDATA[Returns a new key of the specified type with the same annotation as this
1693 key.
1694
1695 @since 3.0]]>
1696 </doc>
1697 </method>
1698 <method name="ofType" return="com.google.inject.Key&lt;?&gt;"
1699 abstract="false" native="false" synchronized="false"
1700 static="false" final="false" visibility="public"
1701 deprecated="not deprecated">
1702 <param name="type" type="java.lang.reflect.Type"/>
1703 <doc>
1704 <![CDATA[Returns a new key of the specified type with the same annotation as this
1705 key.
1706
1707 @since 3.0]]>
1708 </doc>
1709 </method>
1710 <method name="ofType" return="com.google.inject.Key&lt;T&gt;"
1711 abstract="false" native="false" synchronized="false"
1712 static="false" final="false" visibility="public"
1713 deprecated="not deprecated">
1714 <param name="type" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
1715 <doc>
1716 <![CDATA[Returns a new key of the specified type with the same annotation as this
1717 key.
1718
1719 @since 3.0]]>
1720 </doc>
1721 </method>
1722 <method name="hasAttributes" return="boolean"
1723 abstract="false" native="false" synchronized="false"
1724 static="false" final="false" visibility="public"
1725 deprecated="not deprecated">
1726 <doc>
1727 <![CDATA[Returns true if this key has annotation attributes.
1728
1729 @since 3.0]]>
1730 </doc>
1731 </method>
1732 <method name="withoutAttributes" return="com.google.inject.Key&lt;T&gt;"
1733 abstract="false" native="false" synchronized="false"
1734 static="false" final="false" visibility="public"
1735 deprecated="not deprecated">
1736 <doc>
1737 <![CDATA[Returns this key without annotation attributes, i.e. with only the
1738 annotation type.
1739
1740 @since 3.0]]>
1741 </doc>
1742 </method>
1743 <doc>
1744 <![CDATA[Binding key consisting of an injection type and an optional annotation.
1745 Matches the type and annotation at a point of injection.
1746
1747 <p>For example, {@code Key.get(Service.class, Transactional.class)} will
1748 match:
1749
1750 <pre>
1751 {@literal @}Inject
1752 public void setService({@literal @}Transactional Service service) {
1753 ...
1754 }
1755 </pre>
1756
1757 <p>{@code Key} supports generic types via subclassing just like {@link
1758 TypeLiteral}.
1759
1760 <p>Keys do not differentiate between primitive types (int, char, etc.) and
1761 their correpsonding wrapper types (Integer, Character, etc.). Primitive
1762 types will be replaced with their wrapper types when keys are created.
1763
1764 @author crazybob@google.com (Bob Lee)]]>
1765 </doc>
1766 </class>
1767 <!-- end class com.google.inject.Key -->
1768 <!-- start interface com.google.inject.MembersInjector -->
1769 <interface name="MembersInjector" abstract="true"
1770 static="false" final="false" visibility="public"
1771 deprecated="not deprecated">
1772 <method name="injectMembers"
1773 abstract="false" native="false" synchronized="false"
1774 static="false" final="false" visibility="public"
1775 deprecated="not deprecated">
1776 <param name="instance" type="T"/>
1777 <doc>
1778 <![CDATA[Injects dependencies into the fields and methods of {@code instance}. Ignores the presence or
1779 absence of an injectable constructor.
1780
1781 <p>Whenever Guice creates an instance, it performs this injection automatically (after first
1782 performing constructor injection), so if you're able to let Guice create all your objects for
1783 you, you'll never need to use this method.
1784
1785 @param instance to inject members on. May be {@code null}.]]>
1786 </doc>
1787 </method>
1788 <doc>
1789 <![CDATA[Injects dependencies into the fields and methods on instances of type {@code T}. Ignores the
1790 presence or absence of an injectable constructor.
1791
1792 @param <T> type to inject members of
1793
1794 @author crazybob@google.com (Bob Lee)
1795 @author jessewilson@google.com (Jesse Wilson)
1796 @since 2.0]]>
1797 </doc>
1798 </interface>
1799 <!-- end interface com.google.inject.MembersInjector -->
1800 <!-- start interface com.google.inject.Module -->
1801 <interface name="Module" abstract="true"
1802 static="false" final="false" visibility="public"
1803 deprecated="not deprecated">
1804 <method name="configure"
1805 abstract="false" native="false" synchronized="false"
1806 static="false" final="false" visibility="public"
1807 deprecated="not deprecated">
1808 <param name="binder" type="com.google.inject.Binder"/>
1809 <doc>
1810 <![CDATA[Contributes bindings and other configurations for this module to {@code binder}.
1811
1812 <p><strong>Do not invoke this method directly</strong> to install submodules. Instead use
1813 {@link Binder#install(Module)}, which ensures that {@link Provides provider methods} are
1814 discovered.]]>
1815 </doc>
1816 </method>
1817 <doc>
1818 <![CDATA[A module contributes configuration information, typically interface
1819 bindings, which will be used to create an {@link Injector}. A Guice-based
1820 application is ultimately composed of little more than a set of
1821 {@code Module}s and some bootstrapping code.
1822
1823 <p>Your Module classes can use a more streamlined syntax by extending
1824 {@link AbstractModule} rather than implementing this interface directly.
1825
1826 <p>In addition to the bindings configured via {@link #configure}, bindings
1827 will be created for all methods annotated with {@literal @}{@link Provides}.
1828 Use scope and binding annotations on these methods to configure the
1829 bindings.]]>
1830 </doc>
1831 </interface>
1832 <!-- end interface com.google.inject.Module -->
1833 <!-- start class com.google.inject.OutOfScopeException -->
1834 <class name="OutOfScopeException" extends="java.lang.RuntimeException"
1835 abstract="false"
1836 static="false" final="true" visibility="public"
1837 deprecated="not deprecated">
1838 <constructor name="OutOfScopeException" type="java.lang.String"
1839 static="false" final="false" visibility="public"
1840 deprecated="not deprecated">
1841 </constructor>
1842 <constructor name="OutOfScopeException" type="java.lang.String, java.lang.Throwable"
1843 static="false" final="false" visibility="public"
1844 deprecated="not deprecated">
1845 </constructor>
1846 <constructor name="OutOfScopeException" type="java.lang.Throwable"
1847 static="false" final="false" visibility="public"
1848 deprecated="not deprecated">
1849 </constructor>
1850 <doc>
1851 <![CDATA[Thrown from {@link Provider#get} when an attempt is made to access a scoped
1852 object while the scope in question is not currently active.
1853
1854 @author kevinb@google.com (Kevin Bourrillion)
1855 @since 2.0]]>
1856 </doc>
1857 </class>
1858 <!-- end class com.google.inject.OutOfScopeException -->
1859 <!-- start interface com.google.inject.PrivateBinder -->
1860 <interface name="PrivateBinder" abstract="true"
1861 static="false" final="false" visibility="public"
1862 deprecated="not deprecated">
1863 <implements name="com.google.inject.Binder"/>
1864 <method name="expose"
1865 abstract="false" native="false" synchronized="false"
1866 static="false" final="false" visibility="public"
1867 deprecated="not deprecated">
1868 <param name="key" type="com.google.inject.Key&lt;?&gt;"/>
1869 <doc>
1870 <![CDATA[Makes the binding for {@code key} available to the enclosing environment]]>
1871 </doc>
1872 </method>
1873 <method name="expose" return="com.google.inject.binder.AnnotatedElementBuilder"
1874 abstract="false" native="false" synchronized="false"
1875 static="false" final="false" visibility="public"
1876 deprecated="not deprecated">
1877 <param name="type" type="java.lang.Class&lt;?&gt;"/>
1878 <doc>
1879 <![CDATA[Makes a binding for {@code type} available to the enclosing environment. Use {@link
1880 com.google.inject.binder.AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
1881 binding annotation.]]>
1882 </doc>
1883 </method>
1884 <method name="expose" return="com.google.inject.binder.AnnotatedElementBuilder"
1885 abstract="false" native="false" synchronized="false"
1886 static="false" final="false" visibility="public"
1887 deprecated="not deprecated">
1888 <param name="type" type="com.google.inject.TypeLiteral&lt;?&gt;"/>
1889 <doc>
1890 <![CDATA[Makes a binding for {@code type} available to the enclosing environment. Use {@link
1891 AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
1892 binding annotation.]]>
1893 </doc>
1894 </method>
1895 <method name="withSource" return="com.google.inject.PrivateBinder"
1896 abstract="false" native="false" synchronized="false"
1897 static="false" final="false" visibility="public"
1898 deprecated="not deprecated">
1899 <param name="source" type="java.lang.Object"/>
1900 </method>
1901 <method name="skipSources" return="com.google.inject.PrivateBinder"
1902 abstract="false" native="false" synchronized="false"
1903 static="false" final="false" visibility="public"
1904 deprecated="not deprecated">
1905 <param name="classesToSkip" type="java.lang.Class[]"/>
1906 </method>
1907 <doc>
1908 <![CDATA[Returns a binder whose configuration information is hidden from its environment by default. See
1909 {@link com.google.inject.PrivateModule PrivateModule} for details.
1910
1911 @author jessewilson@google.com (Jesse Wilson)
1912 @since 2.0]]>
1913 </doc>
1914 </interface>
1915 <!-- end interface com.google.inject.PrivateBinder -->
1916 <!-- start class com.google.inject.PrivateModule -->
1917 <class name="PrivateModule" extends="java.lang.Object"
1918 abstract="true"
1919 static="false" final="false" visibility="public"
1920 deprecated="not deprecated">
1921 <implements name="com.google.inject.Module"/>
1922 <constructor name="PrivateModule"
1923 static="false" final="false" visibility="public"
1924 deprecated="not deprecated">
1925 </constructor>
1926 <method name="configure"
1927 abstract="false" native="false" synchronized="true"
1928 static="false" final="true" visibility="public"
1929 deprecated="not deprecated">
1930 <param name="binder" type="com.google.inject.Binder"/>
1931 </method>
1932 <method name="configure"
1933 abstract="true" native="false" synchronized="false"
1934 static="false" final="false" visibility="protected"
1935 deprecated="not deprecated">
1936 <doc>
1937 <![CDATA[Creates bindings and other configurations private to this module. Use {@link #expose(Class)
1938 expose()} to make the bindings in this module available externally.]]>
1939 </doc>
1940 </method>
1941 <method name="expose"
1942 abstract="false" native="false" synchronized="false"
1943 static="false" final="true" visibility="protected"
1944 deprecated="not deprecated">
1945 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
1946 <doc>
1947 <![CDATA[Makes the binding for {@code key} available to other modules and the injector.]]>
1948 </doc>
1949 </method>
1950 <method name="expose" return="com.google.inject.binder.AnnotatedElementBuilder"
1951 abstract="false" native="false" synchronized="false"
1952 static="false" final="true" visibility="protected"
1953 deprecated="not deprecated">
1954 <param name="type" type="java.lang.Class&lt;?&gt;"/>
1955 <doc>
1956 <![CDATA[Makes a binding for {@code type} available to other modules and the injector. Use {@link
1957 AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
1958 binding annotation.]]>
1959 </doc>
1960 </method>
1961 <method name="expose" return="com.google.inject.binder.AnnotatedElementBuilder"
1962 abstract="false" native="false" synchronized="false"
1963 static="false" final="true" visibility="protected"
1964 deprecated="not deprecated">
1965 <param name="type" type="com.google.inject.TypeLiteral&lt;?&gt;"/>
1966 <doc>
1967 <![CDATA[Makes a binding for {@code type} available to other modules and the injector. Use {@link
1968 AnnotatedElementBuilder#annotatedWith(Class) annotatedWith()} to expose {@code type} with a
1969 binding annotation.]]>
1970 </doc>
1971 </method>
1972 <method name="binder" return="com.google.inject.PrivateBinder"
1973 abstract="false" native="false" synchronized="false"
1974 static="false" final="true" visibility="protected"
1975 deprecated="not deprecated">
1976 <doc>
1977 <![CDATA[Returns the current binder.]]>
1978 </doc>
1979 </method>
1980 <method name="bindScope"
1981 abstract="false" native="false" synchronized="false"
1982 static="false" final="true" visibility="protected"
1983 deprecated="not deprecated">
1984 <param name="scopeAnnotation" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
1985 <param name="scope" type="com.google.inject.Scope"/>
1986 <doc>
1987 <![CDATA[@see Binder#bindScope(Class, Scope)]]>
1988 </doc>
1989 </method>
1990 <method name="bind" return="com.google.inject.binder.LinkedBindingBuilder&lt;T&gt;"
1991 abstract="false" native="false" synchronized="false"
1992 static="false" final="true" visibility="protected"
1993 deprecated="not deprecated">
1994 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
1995 <doc>
1996 <![CDATA[@see Binder#bind(Key)]]>
1997 </doc>
1998 </method>
1999 <method name="bind" return="com.google.inject.binder.AnnotatedBindingBuilder&lt;T&gt;"
2000 abstract="false" native="false" synchronized="false"
2001 static="false" final="true" visibility="protected"
2002 deprecated="not deprecated">
2003 <param name="typeLiteral" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
2004 <doc>
2005 <![CDATA[@see Binder#bind(TypeLiteral)]]>
2006 </doc>
2007 </method>
2008 <method name="bind" return="com.google.inject.binder.AnnotatedBindingBuilder&lt;T&gt;"
2009 abstract="false" native="false" synchronized="false"
2010 static="false" final="true" visibility="protected"
2011 deprecated="not deprecated">
2012 <param name="clazz" type="java.lang.Class&lt;T&gt;"/>
2013 <doc>
2014 <![CDATA[@see Binder#bind(Class)]]>
2015 </doc>
2016 </method>
2017 <method name="bindConstant" return="com.google.inject.binder.AnnotatedConstantBindingBuilder"
2018 abstract="false" native="false" synchronized="false"
2019 static="false" final="true" visibility="protected"
2020 deprecated="not deprecated">
2021 <doc>
2022 <![CDATA[@see Binder#bindConstant()]]>
2023 </doc>
2024 </method>
2025 <method name="install"
2026 abstract="false" native="false" synchronized="false"
2027 static="false" final="true" visibility="protected"
2028 deprecated="not deprecated">
2029 <param name="module" type="com.google.inject.Module"/>
2030 <doc>
2031 <![CDATA[@see Binder#install(Module)]]>
2032 </doc>
2033 </method>
2034 <method name="addError"
2035 abstract="false" native="false" synchronized="false"
2036 static="false" final="true" visibility="protected"
2037 deprecated="not deprecated">
2038 <param name="message" type="java.lang.String"/>
2039 <param name="arguments" type="java.lang.Object[]"/>
2040 <doc>
2041 <![CDATA[@see Binder#addError(String, Object[])]]>
2042 </doc>
2043 </method>
2044 <method name="addError"
2045 abstract="false" native="false" synchronized="false"
2046 static="false" final="true" visibility="protected"
2047 deprecated="not deprecated">
2048 <param name="t" type="java.lang.Throwable"/>
2049 <doc>
2050 <![CDATA[@see Binder#addError(Throwable)]]>
2051 </doc>
2052 </method>
2053 <method name="addError"
2054 abstract="false" native="false" synchronized="false"
2055 static="false" final="true" visibility="protected"
2056 deprecated="not deprecated">
2057 <param name="message" type="com.google.inject.spi.Message"/>
2058 <doc>
2059 <![CDATA[@see Binder#addError(Message)]]>
2060 </doc>
2061 </method>
2062 <method name="requestInjection"
2063 abstract="false" native="false" synchronized="false"
2064 static="false" final="true" visibility="protected"
2065 deprecated="not deprecated">
2066 <param name="instance" type="java.lang.Object"/>
2067 <doc>
2068 <![CDATA[@see Binder#requestInjection(Object)]]>
2069 </doc>
2070 </method>
2071 <method name="requestStaticInjection"
2072 abstract="false" native="false" synchronized="false"
2073 static="false" final="true" visibility="protected"
2074 deprecated="not deprecated">
2075 <param name="types" type="java.lang.Class[]"/>
2076 <doc>
2077 <![CDATA[@see Binder#requestStaticInjection(Class[])]]>
2078 </doc>
2079 </method>
2080 <method name="bindInterceptor"
2081 abstract="false" native="false" synchronized="false"
2082 static="false" final="true" visibility="protected"
2083 deprecated="not deprecated">
2084 <param name="classMatcher" type="com.google.inject.matcher.Matcher&lt;? super java.lang.Class&lt;?&gt;&gt;"/>
2085 <param name="methodMatcher" type="com.google.inject.matcher.Matcher&lt;? super java.lang.reflect.Method&gt;"/>
2086 <param name="interceptors" type="org.aopalliance.intercept.MethodInterceptor[]"/>
2087 <doc>
2088 <![CDATA[@see Binder#bindInterceptor(com.google.inject.matcher.Matcher, com.google.inject.matcher.Matcher, org.aopalliance.intercept.MethodInterceptor[])]]>
2089 </doc>
2090 </method>
2091 <method name="requireBinding"
2092 abstract="false" native="false" synchronized="false"
2093 static="false" final="true" visibility="protected"
2094 deprecated="not deprecated">
2095 <param name="key" type="com.google.inject.Key&lt;?&gt;"/>
2096 <doc>
2097 <![CDATA[Instructs Guice to require a binding to the given key.]]>
2098 </doc>
2099 </method>
2100 <method name="requireBinding"
2101 abstract="false" native="false" synchronized="false"
2102 static="false" final="true" visibility="protected"
2103 deprecated="not deprecated">
2104 <param name="type" type="java.lang.Class&lt;?&gt;"/>
2105 <doc>
2106 <![CDATA[Instructs Guice to require a binding to the given type.]]>
2107 </doc>
2108 </method>
2109 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
2110 abstract="false" native="false" synchronized="false"
2111 static="false" final="true" visibility="protected"
2112 deprecated="not deprecated">
2113 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
2114 <doc>
2115 <![CDATA[@see Binder#getProvider(Key)]]>
2116 </doc>
2117 </method>
2118 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
2119 abstract="false" native="false" synchronized="false"
2120 static="false" final="true" visibility="protected"
2121 deprecated="not deprecated">
2122 <param name="type" type="java.lang.Class&lt;T&gt;"/>
2123 <doc>
2124 <![CDATA[@see Binder#getProvider(Class)]]>
2125 </doc>
2126 </method>
2127 <method name="convertToTypes"
2128 abstract="false" native="false" synchronized="false"
2129 static="false" final="true" visibility="protected"
2130 deprecated="not deprecated">
2131 <param name="typeMatcher" type="com.google.inject.matcher.Matcher&lt;? super com.google.inject.TypeLiteral&lt;?&gt;&gt;"/>
2132 <param name="converter" type="com.google.inject.spi.TypeConverter"/>
2133 <doc>
2134 <![CDATA[@see Binder#convertToTypes(com.google.inject.matcher.Matcher, com.google.inject.spi.TypeConverter)]]>
2135 </doc>
2136 </method>
2137 <method name="currentStage" return="com.google.inject.Stage"
2138 abstract="false" native="false" synchronized="false"
2139 static="false" final="true" visibility="protected"
2140 deprecated="not deprecated">
2141 <doc>
2142 <![CDATA[@see Binder#currentStage()]]>
2143 </doc>
2144 </method>
2145 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
2146 abstract="false" native="false" synchronized="false"
2147 static="false" final="false" visibility="protected"
2148 deprecated="not deprecated">
2149 <param name="type" type="java.lang.Class&lt;T&gt;"/>
2150 <doc>
2151 <![CDATA[@see Binder#getMembersInjector(Class)]]>
2152 </doc>
2153 </method>
2154 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
2155 abstract="false" native="false" synchronized="false"
2156 static="false" final="false" visibility="protected"
2157 deprecated="not deprecated">
2158 <param name="type" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
2159 <doc>
2160 <![CDATA[@see Binder#getMembersInjector(TypeLiteral)]]>
2161 </doc>
2162 </method>
2163 <method name="bindListener"
2164 abstract="false" native="false" synchronized="false"
2165 static="false" final="false" visibility="protected"
2166 deprecated="not deprecated">
2167 <param name="typeMatcher" type="com.google.inject.matcher.Matcher&lt;? super com.google.inject.TypeLiteral&lt;?&gt;&gt;"/>
2168 <param name="listener" type="com.google.inject.spi.TypeListener"/>
2169 <doc>
2170 <![CDATA[@see Binder#bindListener(com.google.inject.matcher.Matcher, com.google.inject.spi.TypeListener)]]>
2171 </doc>
2172 </method>
2173 <doc>
2174 <![CDATA[A module whose configuration information is hidden from its environment by default. Only bindings
2175 that are explicitly exposed will be available to other modules and to the users of the injector.
2176 This module may expose the bindings it creates and the bindings of the modules it installs.
2177
2178 <p>A private module can be nested within a regular module or within another private module using
2179 {@link Binder#install install()}. Its bindings live in a new environment that inherits bindings,
2180 type converters, scopes, and interceptors from the surrounding ("parent") environment. When you
2181 nest multiple private modules, the result is a tree of environments where the injector's
2182 environment is the root.
2183
2184 <p>Guice EDSL bindings can be exposed with {@link #expose(Class) expose()}. {@literal @}{@link
2185 com.google.inject.Provides Provides} bindings can be exposed with the {@literal @}{@link
2186 Exposed} annotation:
2187
2188 <pre>
2189 public class FooBarBazModule extends PrivateModule {
2190 protected void configure() {
2191 bind(Foo.class).to(RealFoo.class);
2192 expose(Foo.class);
2193
2194 install(new TransactionalBarModule());
2195 expose(Bar.class).annotatedWith(Transactional.class);
2196
2197 bind(SomeImplementationDetail.class);
2198 install(new MoreImplementationDetailsModule());
2199 }
2200
2201 {@literal @}Provides {@literal @}Exposed
2202 public Baz provideBaz() {
2203 return new SuperBaz();
2204 }
2205 }
2206 </pre>
2207
2208 <p>Private modules are implemented using {@link Injector#createChildInjector(Module[]) parent
2209 injectors}. When it can satisfy their dependencies, just-in-time bindings will be created in the
2210 root environment. Such bindings are shared among all environments in the tree.
2211
2212 <p>The scope of a binding is constrained to its environment. A singleton bound in a private
2213 module will be unique to its environment. But a binding for the same type in a different private
2214 module will yield a different instance.
2215
2216 <p>A shared binding that injects the {@code Injector} gets the root injector, which only has
2217 access to bindings in the root environment. An explicit binding that injects the {@code Injector}
2218 gets access to all bindings in the child environment.
2219
2220 <p>To promote a just-in-time binding to an explicit binding, bind it:
2221 <pre>
2222 bind(FooImpl.class);
2223 </pre>
2224
2225 @author jessewilson@google.com (Jesse Wilson)
2226 @since 2.0]]>
2227 </doc>
2228 </class>
2229 <!-- end class com.google.inject.PrivateModule -->
2230 <!-- start class com.google.inject.ProvidedBy -->
2231 <class name="ProvidedBy" abstract="true"
2232 static="false" final="false" visibility="public"
2233 deprecated="not deprecated">
2234 <implements name="java.lang.annotation.Annotation"/>
2235 <doc>
2236 <![CDATA[A pointer to the default provider type for a type.
2237
2238 @author crazybob@google.com (Bob Lee)]]>
2239 </doc>
2240 </class>
2241 <!-- end class com.google.inject.ProvidedBy -->
2242 <!-- start interface com.google.inject.Provider -->
2243 <interface name="Provider" abstract="true"
2244 static="false" final="false" visibility="public"
2245 deprecated="not deprecated">
2246 <implements name="javax.inject.Provider&lt;T&gt;"/>
2247 <method name="get" return="T"
2248 abstract="false" native="false" synchronized="false"
2249 static="false" final="false" visibility="public"
2250 deprecated="not deprecated">
2251 <doc>
2252 <![CDATA[Provides an instance of {@code T}. Must never return {@code null}.
2253
2254 @throws OutOfScopeException when an attempt is made to access a scoped object while the scope
2255 in question is not currently active
2256 @throws ProvisionException if an instance cannot be provided. Such exceptions include messages
2257 and throwables to describe why provision failed.]]>
2258 </doc>
2259 </method>
2260 <doc>
2261 <![CDATA[An object capable of providing instances of type {@code T}. Providers are used in numerous ways
2262 by Guice:
2263
2264 <ul>
2265 <li>When the default means for obtaining instances (an injectable or parameterless constructor)
2266 is insufficient for a particular binding, the module can specify a custom {@code Provider}
2267 instead, to control exactly how Guice creates or obtains instances for the binding.
2268
2269 <li>An implementation class may always choose to have a {@code Provider<T>} instance injected,
2270 rather than having a {@code T} injected directly. This may give you access to multiple
2271 instances, instances you wish to safely mutate and discard, instances which are out of scope
2272 (e.g. using a {@code @RequestScoped} object from within a {@code @SessionScoped} object), or
2273 instances that will be initialized lazily.
2274
2275 <li>A custom {@link Scope} is implemented as a decorator of {@code Provider<T>}, which decides
2276 when to delegate to the backing provider and when to provide the instance some other way.
2277
2278 <li>The {@link Injector} offers access to the {@code Provider<T>} it uses to fulfill requests
2279 for a given key, via the {@link Injector#getProvider} methods.
2280 </ul>
2281
2282 @param <T> the type of object this provides
2283
2284 @author crazybob@google.com (Bob Lee)]]>
2285 </doc>
2286 </interface>
2287 <!-- end interface com.google.inject.Provider -->
2288 <!-- start class com.google.inject.Provides -->
2289 <class name="Provides" abstract="true"
2290 static="false" final="false" visibility="public"
2291 deprecated="not deprecated">
2292 <implements name="java.lang.annotation.Annotation"/>
2293 <doc>
2294 <![CDATA[Annotates methods of a {@link Module} to create a provider method binding. The method's return
2295 type is bound to it's returned value. Guice will pass dependencies to the method as parameters.
2296
2297 @author crazybob@google.com (Bob Lee)
2298 @since 2.0]]>
2299 </doc>
2300 </class>
2301 <!-- end class com.google.inject.Provides -->
2302 <!-- start class com.google.inject.ProvisionException -->
2303 <class name="ProvisionException" extends="java.lang.RuntimeException"
2304 abstract="false"
2305 static="false" final="true" visibility="public"
2306 deprecated="not deprecated">
2307 <constructor name="ProvisionException" type="java.lang.Iterable&lt;com.google.inject.spi.Message&gt;"
2308 static="false" final="false" visibility="public"
2309 deprecated="not deprecated">
2310 <doc>
2311 <![CDATA[Creates a ConfigurationException containing {@code messages}.]]>
2312 </doc>
2313 </constructor>
2314 <constructor name="ProvisionException" type="java.lang.String, java.lang.Throwable"
2315 static="false" final="false" visibility="public"
2316 deprecated="not deprecated">
2317 </constructor>
2318 <constructor name="ProvisionException" type="java.lang.String"
2319 static="false" final="false" visibility="public"
2320 deprecated="not deprecated">
2321 </constructor>
2322 <method name="getErrorMessages" return="java.util.Collection&lt;com.google.inject.spi.Message&gt;"
2323 abstract="false" native="false" synchronized="false"
2324 static="false" final="false" visibility="public"
2325 deprecated="not deprecated">
2326 <doc>
2327 <![CDATA[Returns messages for the errors that caused this exception.]]>
2328 </doc>
2329 </method>
2330 <method name="getMessage" return="java.lang.String"
2331 abstract="false" native="false" synchronized="false"
2332 static="false" final="false" visibility="public"
2333 deprecated="not deprecated">
2334 </method>
2335 <doc>
2336 <![CDATA[Indicates that there was a runtime failure while providing an instance.
2337
2338 @author kevinb@google.com (Kevin Bourrillion)
2339 @author jessewilson@google.com (Jesse Wilson)
2340 @since 2.0]]>
2341 </doc>
2342 </class>
2343 <!-- end class com.google.inject.ProvisionException -->
2344 <!-- start interface com.google.inject.Scope -->
2345 <interface name="Scope" abstract="true"
2346 static="false" final="false" visibility="public"
2347 deprecated="not deprecated">
2348 <method name="scope" return="com.google.inject.Provider&lt;T&gt;"
2349 abstract="false" native="false" synchronized="false"
2350 static="false" final="false" visibility="public"
2351 deprecated="not deprecated">
2352 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
2353 <param name="unscoped" type="com.google.inject.Provider&lt;T&gt;"/>
2354 <doc>
2355 <![CDATA[Scopes a provider. The returned provider returns objects from this scope.
2356 If an object does not exist in this scope, the provider can use the given
2357 unscoped provider to retrieve one.
2358
2359 <p>Scope implementations are strongly encouraged to override
2360 {@link Object#toString} in the returned provider and include the backing
2361 provider's {@code toString()} output.
2362
2363 @param key binding key
2364 @param unscoped locates an instance when one doesn't already exist in this
2365 scope.
2366 @return a new provider which only delegates to the given unscoped provider
2367 when an instance of the requested object doesn't already exist in this
2368 scope]]>
2369 </doc>
2370 </method>
2371 <method name="toString" return="java.lang.String"
2372 abstract="false" native="false" synchronized="false"
2373 static="false" final="false" visibility="public"
2374 deprecated="not deprecated">
2375 <doc>
2376 <![CDATA[A short but useful description of this scope. For comparison, the standard
2377 scopes that ship with guice use the descriptions
2378 {@code "Scopes.SINGLETON"}, {@code "ServletScopes.SESSION"} and
2379 {@code "ServletScopes.REQUEST"}.]]>
2380 </doc>
2381 </method>
2382 <doc>
2383 <![CDATA[A scope is a level of visibility that instances provided by Guice may have.
2384 By default, an instance created by the {@link Injector} has <i>no scope</i>,
2385 meaning it has no state from the framework's perspective -- the
2386 {@code Injector} creates it, injects it once into the class that required it,
2387 and then immediately forgets it. Associating a scope with a particular
2388 binding allows the created instance to be "remembered" and possibly used
2389 again for other injections.
2390
2391 <p>An example of a scope is {@link Scopes#SINGLETON}.
2392
2393 @author crazybob@google.com (Bob Lee)]]>
2394 </doc>
2395 </interface>
2396 <!-- end interface com.google.inject.Scope -->
2397 <!-- start class com.google.inject.ScopeAnnotation -->
2398 <class name="ScopeAnnotation" abstract="true"
2399 static="false" final="false" visibility="public"
2400 deprecated="not deprecated">
2401 <implements name="java.lang.annotation.Annotation"/>
2402 <doc>
2403 <![CDATA[Annotates annotations which are used for scoping. Only one such annotation
2404 may apply to a single implementation class. You must also annotate scope
2405 annotations with {@code @Retention(RUNTIME)}. For example:
2406
2407 <pre>
2408 {@code @}Retention(RUNTIME)
2409 {@code @}Target(TYPE, METHOD)
2410 {@code @}ScopeAnnotation
2411 public {@code @}interface SessionScoped {}
2412 </pre>
2413
2414 @author crazybob@google.com (Bob Lee)]]>
2415 </doc>
2416 </class>
2417 <!-- end class com.google.inject.ScopeAnnotation -->
2418 <!-- start class com.google.inject.Scopes -->
2419 <class name="Scopes" extends="java.lang.Object"
2420 abstract="false"
2421 static="false" final="false" visibility="public"
2422 deprecated="not deprecated">
2423 <method name="isSingleton" return="boolean"
2424 abstract="false" native="false" synchronized="false"
2425 static="true" final="false" visibility="public"
2426 deprecated="not deprecated">
2427 <param name="binding" type="com.google.inject.Binding&lt;?&gt;"/>
2428 <doc>
2429 <![CDATA[Returns true if {@code binding} is singleton-scoped. If the binding is a {@link
2430 com.google.inject.spi.LinkedKeyBinding linked key binding} and belongs to an injector (ie. it
2431 was retrieved via {@link Injector#getBinding Injector.getBinding()}), then this method will
2432 also true if the target binding is singleton-scoped.
2433
2434 @since 3.0]]>
2435 </doc>
2436 </method>
2437 <field name="SINGLETON" type="com.google.inject.Scope"
2438 transient="false" volatile="false"
2439 static="true" final="true" visibility="public"
2440 deprecated="not deprecated">
2441 <doc>
2442 <![CDATA[One instance per {@link Injector}. Also see {@code @}{@link Singleton}.]]>
2443 </doc>
2444 </field>
2445 <field name="NO_SCOPE" type="com.google.inject.Scope"
2446 transient="false" volatile="false"
2447 static="true" final="true" visibility="public"
2448 deprecated="not deprecated">
2449 <doc>
2450 <![CDATA[No scope; the same as not applying any scope at all. Each time the
2451 Injector obtains an instance of an object with "no scope", it injects this
2452 instance then immediately forgets it. When the next request for the same
2453 binding arrives it will need to obtain the instance over again.
2454
2455 <p>This exists only in case a class has been annotated with a scope
2456 annotation such as {@link Singleton @Singleton}, and you need to override
2457 this to "no scope" in your binding.
2458
2459 @since 2.0]]>
2460 </doc>
2461 </field>
2462 <doc>
2463 <![CDATA[Built-in scope implementations.
2464
2465 @author crazybob@google.com (Bob Lee)]]>
2466 </doc>
2467 </class>
2468 <!-- end class com.google.inject.Scopes -->
2469 <!-- start class com.google.inject.Singleton -->
2470 <class name="Singleton" abstract="true"
2471 static="false" final="false" visibility="public"
2472 deprecated="not deprecated">
2473 <implements name="java.lang.annotation.Annotation"/>
2474 <doc>
2475 <![CDATA[Apply this to implementation classes when you want only one instance
2476 (per {@link Injector}) to be reused for all injections for that binding.
2477
2478 @author crazybob@google.com (Bob Lee)]]>
2479 </doc>
2480 </class>
2481 <!-- end class com.google.inject.Singleton -->
2482 <!-- start class com.google.inject.Stage -->
2483 <class name="Stage" extends="java.lang.Enum&lt;com.google.inject.Stage&gt;"
2484 abstract="false"
2485 static="false" final="true" visibility="public"
2486 deprecated="not deprecated">
2487 <method name="values" return="com.google.inject.Stage[]"
2488 abstract="false" native="false" synchronized="false"
2489 static="true" final="false" visibility="public"
2490 deprecated="not deprecated">
2491 </method>
2492 <method name="valueOf" return="com.google.inject.Stage"
2493 abstract="false" native="false" synchronized="false"
2494 static="true" final="false" visibility="public"
2495 deprecated="not deprecated">
2496 <param name="name" type="java.lang.String"/>
2497 </method>
2498 <doc>
2499 <![CDATA[The stage we're running in.
2500
2501 @author crazybob@google.com (Bob Lee)]]>
2502 </doc>
2503 </class>
2504 <!-- end class com.google.inject.Stage -->
2505 <!-- start class com.google.inject.TypeLiteral -->
2506 <class name="TypeLiteral" extends="java.lang.Object"
2507 abstract="false"
2508 static="false" final="false" visibility="public"
2509 deprecated="not deprecated">
2510 <constructor name="TypeLiteral"
2511 static="false" final="false" visibility="protected"
2512 deprecated="not deprecated">
2513 <doc>
2514 <![CDATA[Constructs a new type literal. Derives represented class from type
2515 parameter.
2516
2517 <p>Clients create an empty anonymous subclass. Doing so embeds the type
2518 parameter in the anonymous class's type hierarchy so we can reconstitute it
2519 at runtime despite erasure.]]>
2520 </doc>
2521 </constructor>
2522 <method name="getRawType" return="java.lang.Class&lt;? super T&gt;"
2523 abstract="false" native="false" synchronized="false"
2524 static="false" final="true" visibility="public"
2525 deprecated="not deprecated">
2526 <doc>
2527 <![CDATA[Returns the raw (non-generic) type for this type.
2528
2529 @since 2.0]]>
2530 </doc>
2531 </method>
2532 <method name="getType" return="java.lang.reflect.Type"
2533 abstract="false" native="false" synchronized="false"
2534 static="false" final="true" visibility="public"
2535 deprecated="not deprecated">
2536 <doc>
2537 <![CDATA[Gets underlying {@code Type} instance.]]>
2538 </doc>
2539 </method>
2540 <method name="hashCode" return="int"
2541 abstract="false" native="false" synchronized="false"
2542 static="false" final="true" visibility="public"
2543 deprecated="not deprecated">
2544 </method>
2545 <method name="equals" return="boolean"
2546 abstract="false" native="false" synchronized="false"
2547 static="false" final="true" visibility="public"
2548 deprecated="not deprecated">
2549 <param name="o" type="java.lang.Object"/>
2550 </method>
2551 <method name="toString" return="java.lang.String"
2552 abstract="false" native="false" synchronized="false"
2553 static="false" final="true" visibility="public"
2554 deprecated="not deprecated">
2555 </method>
2556 <method name="get" return="com.google.inject.TypeLiteral&lt;?&gt;"
2557 abstract="false" native="false" synchronized="false"
2558 static="true" final="false" visibility="public"
2559 deprecated="not deprecated">
2560 <param name="type" type="java.lang.reflect.Type"/>
2561 <doc>
2562 <![CDATA[Gets type literal for the given {@code Type} instance.]]>
2563 </doc>
2564 </method>
2565 <method name="get" return="com.google.inject.TypeLiteral&lt;T&gt;"
2566 abstract="false" native="false" synchronized="false"
2567 static="true" final="false" visibility="public"
2568 deprecated="not deprecated">
2569 <param name="type" type="java.lang.Class&lt;T&gt;"/>
2570 <doc>
2571 <![CDATA[Gets type literal for the given {@code Class} instance.]]>
2572 </doc>
2573 </method>
2574 <method name="getSupertype" return="com.google.inject.TypeLiteral&lt;?&gt;"
2575 abstract="false" native="false" synchronized="false"
2576 static="false" final="false" visibility="public"
2577 deprecated="not deprecated">
2578 <param name="supertype" type="java.lang.Class&lt;?&gt;"/>
2579 <doc>
2580 <![CDATA[Returns the generic form of {@code supertype}. For example, if this is {@code
2581 ArrayList<String>}, this returns {@code Iterable<String>} given the input {@code
2582 Iterable.class}.
2583
2584 @param supertype a superclass of, or interface implemented by, this.
2585 @since 2.0]]>
2586 </doc>
2587 </method>
2588 <method name="getFieldType" return="com.google.inject.TypeLiteral&lt;?&gt;"
2589 abstract="false" native="false" synchronized="false"
2590 static="false" final="false" visibility="public"
2591 deprecated="not deprecated">
2592 <param name="field" type="java.lang.reflect.Field"/>
2593 <doc>
2594 <![CDATA[Returns the resolved generic type of {@code field}.
2595
2596 @param field a field defined by this or any superclass.
2597 @since 2.0]]>
2598 </doc>
2599 </method>
2600 <method name="getParameterTypes" return="java.util.List&lt;com.google.inject.TypeLiteral&lt;?&gt;&gt;"
2601 abstract="false" native="false" synchronized="false"
2602 static="false" final="false" visibility="public"
2603 deprecated="not deprecated">
2604 <param name="methodOrConstructor" type="java.lang.reflect.Member"/>
2605 <doc>
2606 <![CDATA[Returns the resolved generic parameter types of {@code methodOrConstructor}.
2607
2608 @param methodOrConstructor a method or constructor defined by this or any supertype.
2609 @since 2.0]]>
2610 </doc>
2611 </method>
2612 <method name="getExceptionTypes" return="java.util.List&lt;com.google.inject.TypeLiteral&lt;?&gt;&gt;"
2613 abstract="false" native="false" synchronized="false"
2614 static="false" final="false" visibility="public"
2615 deprecated="not deprecated">
2616 <param name="methodOrConstructor" type="java.lang.reflect.Member"/>
2617 <doc>
2618 <![CDATA[Returns the resolved generic exception types thrown by {@code constructor}.
2619
2620 @param methodOrConstructor a method or constructor defined by this or any supertype.
2621 @since 2.0]]>
2622 </doc>
2623 </method>
2624 <method name="getReturnType" return="com.google.inject.TypeLiteral&lt;?&gt;"
2625 abstract="false" native="false" synchronized="false"
2626 static="false" final="false" visibility="public"
2627 deprecated="not deprecated">
2628 <param name="method" type="java.lang.reflect.Method"/>
2629 <doc>
2630 <![CDATA[Returns the resolved generic return type of {@code method}.
2631
2632 @param method a method defined by this or any supertype.
2633 @since 2.0]]>
2634 </doc>
2635 </method>
2636 <doc>
2637 <![CDATA[Represents a generic type {@code T}. Java doesn't yet provide a way to
2638 represent generic types, so this class does. Forces clients to create a
2639 subclass of this class which enables retrieval the type information even at
2640 runtime.
2641
2642 <p>For example, to create a type literal for {@code List<String>}, you can
2643 create an empty anonymous inner class:
2644
2645 <p>
2646 {@code TypeLiteral<List<String>> list = new TypeLiteral<List<String>>() {};}
2647
2648 <p>This syntax cannot be used to create type literals that have wildcard
2649 parameters, such as {@code Class<?>} or {@code List<? extends CharSequence>}.
2650 Such type literals must be constructed programatically, either by {@link
2651 Method#getGenericReturnType extracting types from members} or by using the
2652 {@link Types} factory class.
2653
2654 <p>Along with modeling generic types, this class can resolve type parameters.
2655 For example, to figure out what type {@code keySet()} returns on a {@code
2656 Map<Integer, String>}, use this code:<pre> {@code
2657
2658 TypeLiteral<Map<Integer, String>> mapType
2659 = new TypeLiteral<Map<Integer, String>>() {};
2660 TypeLiteral<?> keySetType
2661 = mapType.getReturnType(Map.class.getMethod("keySet"));
2662 System.out.println(keySetType); // prints "Set<Integer>"}</pre>
2663
2664 @author crazybob@google.com (Bob Lee)
2665 @author jessewilson@google.com (Jesse Wilson)]]>
2666 </doc>
2667 </class>
2668 <!-- end class com.google.inject.TypeLiteral -->
2669</package>
2670<package name="com.google.inject.assistedinject">
2671 <!-- start class com.google.inject.assistedinject.Assisted -->
2672 <class name="Assisted" abstract="true"
2673 static="false" final="false" visibility="public"
2674 deprecated="not deprecated">
2675 <implements name="java.lang.annotation.Annotation"/>
2676 <doc>
2677 <![CDATA[Annotates an injected parameter or field whose value comes from an argument to a factory method.
2678
2679 @author jmourits@google.com (Jerome Mourits)
2680 @author jessewilson@google.com (Jesse Wilson)]]>
2681 </doc>
2682 </class>
2683 <!-- end class com.google.inject.assistedinject.Assisted -->
2684 <!-- start class com.google.inject.assistedinject.AssistedInject -->
2685 <class name="AssistedInject" abstract="true"
2686 static="false" final="false" visibility="public"
2687 deprecated="not deprecated">
2688 <implements name="java.lang.annotation.Annotation"/>
2689 <doc>
2690 <![CDATA[<p>
2691 When used in tandem with {@link FactoryModuleBuilder}, constructors annotated with
2692 {@code @AssistedInject} indicate that multiple constructors can be injected, each with different
2693 parameters. AssistedInject annotations should not be mixed with {@literal @}{@link Inject}
2694 annotations. The assisted parameters must exactly match one corresponding factory method within
2695 the factory interface, but the parameters do not need to be in the same order. Constructors
2696 annotated with AssistedInject <b>are</b> created by Guice and receive all the benefits
2697 (such as AOP).
2698
2699 <p>
2700 <strong>Obsolete Usage:</strong> When used in tandem with {@link FactoryProvider}, constructors
2701 annotated with {@code @AssistedInject} trigger a "backwards compatibility mode". The assisted
2702 parameters must exactly match one corresponding factory method within the factory interface and
2703 all must be in the same order as listed in the factory. In this backwards compatable mode,
2704 constructors annotated with AssistedInject <b>are not</b> created by Guice and thus receive
2705 none of the benefits.
2706
2707 <p>
2708 Constructor parameters must be either supplied by the factory interface and marked with
2709 <code>@Assisted</code>, or they must be injectable.
2710
2711 @author jmourits@google.com (Jerome Mourits)
2712 @author jessewilson@google.com (Jesse Wilson)]]>
2713 </doc>
2714 </class>
2715 <!-- end class com.google.inject.assistedinject.AssistedInject -->
2716 <!-- start interface com.google.inject.assistedinject.AssistedInjectBinding -->
2717 <interface name="AssistedInjectBinding" abstract="true"
2718 static="false" final="false" visibility="public"
2719 deprecated="not deprecated">
2720 <method name="getKey" return="com.google.inject.Key&lt;T&gt;"
2721 abstract="false" native="false" synchronized="false"
2722 static="false" final="false" visibility="public"
2723 deprecated="not deprecated">
2724 <doc>
2725 <![CDATA[Returns the {@link Key} for the factory binding.]]>
2726 </doc>
2727 </method>
2728 <method name="getAssistedMethods" return="java.util.Collection&lt;com.google.inject.assistedinject.AssistedMethod&gt;"
2729 abstract="false" native="false" synchronized="false"
2730 static="false" final="false" visibility="public"
2731 deprecated="not deprecated">
2732 <doc>
2733 <![CDATA[Returns an {@link AssistedMethod} for each method in the factory.]]>
2734 </doc>
2735 </method>
2736 <doc>
2737 <![CDATA[A binding for a factory created by FactoryModuleBuilder.
2738
2739 @param <T> The fully qualified type of the factory.
2740
2741 @since 3.0
2742 @author ramakrishna@google.com (Ramakrishna Rajanna)]]>
2743 </doc>
2744 </interface>
2745 <!-- end interface com.google.inject.assistedinject.AssistedInjectBinding -->
2746 <!-- start interface com.google.inject.assistedinject.AssistedInjectTargetVisitor -->
2747 <interface name="AssistedInjectTargetVisitor" abstract="true"
2748 static="false" final="false" visibility="public"
2749 deprecated="not deprecated">
2750 <implements name="com.google.inject.spi.BindingTargetVisitor&lt;T, V&gt;"/>
2751 <method name="visit" return="V"
2752 abstract="false" native="false" synchronized="false"
2753 static="false" final="false" visibility="public"
2754 deprecated="not deprecated">
2755 <param name="assistedInjectBinding" type="com.google.inject.assistedinject.AssistedInjectBinding&lt;? extends T&gt;"/>
2756 <doc>
2757 <![CDATA[Visits an {@link AssistedInjectBinding} created through {@link FactoryModuleBuilder}.]]>
2758 </doc>
2759 </method>
2760 <doc>
2761 <![CDATA[A visitor for the AssistedInject extension.
2762 <p>
2763 If your {@link BindingTargetVisitor} implements this interface, bindings created by using
2764 {@link FactoryModuleBuilder} will be visited through this interface.
2765
2766 @since 3.0
2767 @author ramakrishna@google.com (Ramakrishna Rajanna)]]>
2768 </doc>
2769 </interface>
2770 <!-- end interface com.google.inject.assistedinject.AssistedInjectTargetVisitor -->
2771 <!-- start interface com.google.inject.assistedinject.AssistedMethod -->
2772 <interface name="AssistedMethod" abstract="true"
2773 static="false" final="false" visibility="public"
2774 deprecated="not deprecated">
2775 <method name="getFactoryMethod" return="java.lang.reflect.Method"
2776 abstract="false" native="false" synchronized="false"
2777 static="false" final="false" visibility="public"
2778 deprecated="not deprecated">
2779 <doc>
2780 <![CDATA[Returns the factory method that is being assisted.]]>
2781 </doc>
2782 </method>
2783 <method name="getImplementationType" return="com.google.inject.TypeLiteral&lt;?&gt;"
2784 abstract="false" native="false" synchronized="false"
2785 static="false" final="false" visibility="public"
2786 deprecated="not deprecated">
2787 <doc>
2788 <![CDATA[Returns the implementation type that will be created when the method is
2789 used.]]>
2790 </doc>
2791 </method>
2792 <method name="getImplementationConstructor" return="java.lang.reflect.Constructor&lt;?&gt;"
2793 abstract="false" native="false" synchronized="false"
2794 static="false" final="false" visibility="public"
2795 deprecated="not deprecated">
2796 <doc>
2797 <![CDATA[Returns the constructor that will be used to construct instances of the
2798 implementation.]]>
2799 </doc>
2800 </method>
2801 <method name="getDependencies" return="java.util.Set&lt;com.google.inject.spi.Dependency&lt;?&gt;&gt;"
2802 abstract="false" native="false" synchronized="false"
2803 static="false" final="false" visibility="public"
2804 deprecated="not deprecated">
2805 <doc>
2806 <![CDATA[Returns all non-assisted dependencies required to construct and inject
2807 the implementation.]]>
2808 </doc>
2809 </method>
2810 <doc>
2811 <![CDATA[Details about how a method in an assisted inject factory will be assisted.
2812
2813 @since 3.0
2814 @author ramakrishna@google.com (Ramakrishna Rajanna)]]>
2815 </doc>
2816 </interface>
2817 <!-- end interface com.google.inject.assistedinject.AssistedMethod -->
2818 <!-- start class com.google.inject.assistedinject.FactoryModuleBuilder -->
2819 <class name="FactoryModuleBuilder" extends="java.lang.Object"
2820 abstract="false"
2821 static="false" final="false" visibility="public"
2822 deprecated="not deprecated">
2823 <constructor name="FactoryModuleBuilder"
2824 static="false" final="false" visibility="public"
2825 deprecated="not deprecated">
2826 </constructor>
2827 <method name="implement" return="com.google.inject.assistedinject.FactoryModuleBuilder"
2828 abstract="false" native="false" synchronized="false"
2829 static="false" final="false" visibility="public"
2830 deprecated="not deprecated">
2831 <param name="source" type="java.lang.Class&lt;T&gt;"/>
2832 <param name="target" type="java.lang.Class&lt;? extends T&gt;"/>
2833 <doc>
2834 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2835 </doc>
2836 </method>
2837 <method name="implement" return="com.google.inject.assistedinject.FactoryModuleBuilder"
2838 abstract="false" native="false" synchronized="false"
2839 static="false" final="false" visibility="public"
2840 deprecated="not deprecated">
2841 <param name="source" type="java.lang.Class&lt;T&gt;"/>
2842 <param name="target" type="com.google.inject.TypeLiteral&lt;? extends T&gt;"/>
2843 <doc>
2844 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2845 </doc>
2846 </method>
2847 <method name="implement" return="com.google.inject.assistedinject.FactoryModuleBuilder"
2848 abstract="false" native="false" synchronized="false"
2849 static="false" final="false" visibility="public"
2850 deprecated="not deprecated">
2851 <param name="source" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
2852 <param name="target" type="java.lang.Class&lt;? extends T&gt;"/>
2853 <doc>
2854 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2855 </doc>
2856 </method>
2857 <method name="implement" return="com.google.inject.assistedinject.FactoryModuleBuilder"
2858 abstract="false" native="false" synchronized="false"
2859 static="false" final="false" visibility="public"
2860 deprecated="not deprecated">
2861 <param name="source" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
2862 <param name="target" type="com.google.inject.TypeLiteral&lt;? extends T&gt;"/>
2863 <doc>
2864 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2865 </doc>
2866 </method>
2867 <method name="implement" return="com.google.inject.assistedinject.FactoryModuleBuilder"
2868 abstract="false" native="false" synchronized="false"
2869 static="false" final="false" visibility="public"
2870 deprecated="not deprecated">
2871 <param name="source" type="java.lang.Class&lt;T&gt;"/>
2872 <param name="annotation" type="java.lang.annotation.Annotation"/>
2873 <param name="target" type="java.lang.Class&lt;? extends T&gt;"/>
2874 <doc>
2875 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2876 </doc>
2877 </method>
2878 <method name="implement" return="com.google.inject.assistedinject.FactoryModuleBuilder"
2879 abstract="false" native="false" synchronized="false"
2880 static="false" final="false" visibility="public"
2881 deprecated="not deprecated">
2882 <param name="source" type="java.lang.Class&lt;T&gt;"/>
2883 <param name="annotation" type="java.lang.annotation.Annotation"/>
2884 <param name="target" type="com.google.inject.TypeLiteral&lt;? extends T&gt;"/>
2885 <doc>
2886 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2887 </doc>
2888 </method>
2889 <method name="implement" return="com.google.inject.assistedinject.FactoryModuleBuilder"
2890 abstract="false" native="false" synchronized="false"
2891 static="false" final="false" visibility="public"
2892 deprecated="not deprecated">
2893 <param name="source" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
2894 <param name="annotation" type="java.lang.annotation.Annotation"/>
2895 <param name="target" type="java.lang.Class&lt;? extends T&gt;"/>
2896 <doc>
2897 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2898 </doc>
2899 </method>
2900 <method name="implement" return="com.google.inject.assistedinject.FactoryModuleBuilder"
2901 abstract="false" native="false" synchronized="false"
2902 static="false" final="false" visibility="public"
2903 deprecated="not deprecated">
2904 <param name="source" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
2905 <param name="annotation" type="java.lang.annotation.Annotation"/>
2906 <param name="target" type="com.google.inject.TypeLiteral&lt;? extends T&gt;"/>
2907 <doc>
2908 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2909 </doc>
2910 </method>
2911 <method name="implement" return="com.google.inject.assistedinject.FactoryModuleBuilder"
2912 abstract="false" native="false" synchronized="false"
2913 static="false" final="false" visibility="public"
2914 deprecated="not deprecated">
2915 <param name="source" type="java.lang.Class&lt;T&gt;"/>
2916 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
2917 <param name="target" type="java.lang.Class&lt;? extends T&gt;"/>
2918 <doc>
2919 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2920 </doc>
2921 </method>
2922 <method name="implement" return="com.google.inject.assistedinject.FactoryModuleBuilder"
2923 abstract="false" native="false" synchronized="false"
2924 static="false" final="false" visibility="public"
2925 deprecated="not deprecated">
2926 <param name="source" type="java.lang.Class&lt;T&gt;"/>
2927 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
2928 <param name="target" type="com.google.inject.TypeLiteral&lt;? extends T&gt;"/>
2929 <doc>
2930 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2931 </doc>
2932 </method>
2933 <method name="implement" return="com.google.inject.assistedinject.FactoryModuleBuilder"
2934 abstract="false" native="false" synchronized="false"
2935 static="false" final="false" visibility="public"
2936 deprecated="not deprecated">
2937 <param name="source" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
2938 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
2939 <param name="target" type="java.lang.Class&lt;? extends T&gt;"/>
2940 <doc>
2941 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2942 </doc>
2943 </method>
2944 <method name="implement" return="com.google.inject.assistedinject.FactoryModuleBuilder"
2945 abstract="false" native="false" synchronized="false"
2946 static="false" final="false" visibility="public"
2947 deprecated="not deprecated">
2948 <param name="source" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
2949 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
2950 <param name="target" type="com.google.inject.TypeLiteral&lt;? extends T&gt;"/>
2951 <doc>
2952 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2953 </doc>
2954 </method>
2955 <method name="implement" return="com.google.inject.assistedinject.FactoryModuleBuilder"
2956 abstract="false" native="false" synchronized="false"
2957 static="false" final="false" visibility="public"
2958 deprecated="not deprecated">
2959 <param name="source" type="com.google.inject.Key&lt;T&gt;"/>
2960 <param name="target" type="java.lang.Class&lt;? extends T&gt;"/>
2961 <doc>
2962 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2963 </doc>
2964 </method>
2965 <method name="implement" return="com.google.inject.assistedinject.FactoryModuleBuilder"
2966 abstract="false" native="false" synchronized="false"
2967 static="false" final="false" visibility="public"
2968 deprecated="not deprecated">
2969 <param name="source" type="com.google.inject.Key&lt;T&gt;"/>
2970 <param name="target" type="com.google.inject.TypeLiteral&lt;? extends T&gt;"/>
2971 <doc>
2972 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2973 </doc>
2974 </method>
2975 <method name="build" return="com.google.inject.Module"
2976 abstract="false" native="false" synchronized="false"
2977 static="false" final="false" visibility="public"
2978 deprecated="not deprecated">
2979 <param name="factoryInterface" type="java.lang.Class&lt;F&gt;"/>
2980 <doc>
2981 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2982 </doc>
2983 </method>
2984 <method name="build" return="com.google.inject.Module"
2985 abstract="false" native="false" synchronized="false"
2986 static="false" final="false" visibility="public"
2987 deprecated="not deprecated">
2988 <param name="factoryInterface" type="com.google.inject.TypeLiteral&lt;F&gt;"/>
2989 <doc>
2990 <![CDATA[See the factory configuration examples at {@link FactoryModuleBuilder}.]]>
2991 </doc>
2992 </method>
2993 <method name="build" return="com.google.inject.Module"
2994 abstract="false" native="false" synchronized="false"
2995 static="false" final="false" visibility="public"
2996 deprecated="not deprecated">
2997 <param name="factoryInterface" type="com.google.inject.Key&lt;F&gt;"/>
2998 </method>
2999 <doc>
3000 <![CDATA[Provides a factory that combines the caller's arguments with injector-supplied values to
3001 construct objects.
3002
3003 <h3>Defining a factory</h3>
3004 Create an interface whose methods return the constructed type, or any of its supertypes. The
3005 method's parameters are the arguments required to build the constructed type.
3006
3007 <pre>public interface PaymentFactory {
3008 Payment create(Date startDate, Money amount);
3009 }</pre>
3010
3011 You can name your factory methods whatever you like, such as <i>create</i>, <i>createPayment</i>
3012 or <i>newPayment</i>.
3013
3014 <h3>Creating a type that accepts factory parameters</h3>
3015 {@code constructedType} is a concrete class with an {@literal @}{@link com.google.inject.Inject
3016 Inject}-annotated constructor. In addition to injector-supplied parameters, the constructor
3017 should have parameters that match each of the factory method's parameters. Each factory-supplied
3018 parameter requires an {@literal @}{@link Assisted} annotation. This serves to document that the
3019 parameter is not bound by your application's modules.
3020
3021 <pre>public class RealPayment implements Payment {
3022 {@literal @}Inject
3023 public RealPayment(
3024 CreditService creditService,
3025 AuthService authService,
3026 <strong>{@literal @}Assisted Date startDate</strong>,
3027 <strong>{@literal @}Assisted Money amount</strong>) {
3028 ...
3029 }
3030 }</pre>
3031
3032 <h3>Multiple factory methods for the same type</h3>
3033 If the factory contains many methods that return the same type, you can create multiple
3034 constructors in your concrete class, each constructor marked with with
3035 {@literal @}{@link AssistedInject}, in order to match the different parameters types of the
3036 factory methods.
3037
3038 <pre>public interface PaymentFactory {
3039 Payment create(Date startDate, Money amount);
3040 Payment createWithoutDate(Money amount);
3041 }
3042
3043 public class RealPayment implements Payment {
3044 {@literal @}AssistedInject
3045 public RealPayment(
3046 CreditService creditService,
3047 AuthService authService,
3048 <strong>{@literal @}Assisted Date startDate</strong>,
3049 <strong>{@literal @}Assisted Money amount</strong>) {
3050 ...
3051 }
3052
3053 {@literal @}AssistedInject
3054 public RealPayment(
3055 CreditService creditService,
3056 AuthService authService,
3057 <strong>{@literal @}Assisted Money amount</strong>) {
3058 ...
3059 }
3060 }</pre>
3061
3062 <h3>Configuring simple factories</h3>
3063 In your {@link Module module}, install a {@code FactoryModuleBuilder} that creates the
3064 factory:
3065
3066 <pre>install(new FactoryModuleBuilder()
3067 .implement(Payment.class, RealPayment.class)
3068 .build(PaymentFactory.class);</pre>
3069
3070 As a side-effect of this binding, Guice will inject the factory to initialize it for use. The
3071 factory cannot be used until the injector has been initialized.
3072
3073 <h3>Using the factory</h3>
3074 Inject your factory into your application classes. When you use the factory, your arguments
3075 will be combined with values from the injector to construct an instance.
3076
3077 <pre>public class PaymentAction {
3078 {@literal @}Inject private PaymentFactory paymentFactory;
3079
3080 public void doPayment(Money amount) {
3081 Payment payment = paymentFactory.create(new Date(), amount);
3082 payment.apply();
3083 }
3084 }</pre>
3085
3086 <h3>Making parameter types distinct</h3>
3087 The types of the factory method's parameters must be distinct. To use multiple parameters of
3088 the same type, use a named {@literal @}{@link Assisted} annotation to disambiguate the
3089 parameters. The names must be applied to the factory method's parameters:
3090
3091 <pre>public interface PaymentFactory {
3092 Payment create(
3093 <strong>{@literal @}Assisted("startDate")</strong> Date startDate,
3094 <strong>{@literal @}Assisted("dueDate")</strong> Date dueDate,
3095 Money amount);
3096 } </pre>
3097
3098 ...and to the concrete type's constructor parameters:
3099
3100 <pre>public class RealPayment implements Payment {
3101 {@literal @}Inject
3102 public RealPayment(
3103 CreditService creditService,
3104 AuthService authService,
3105 <strong>{@literal @}Assisted("startDate")</strong> Date startDate,
3106 <strong>{@literal @}Assisted("dueDate")</strong> Date dueDate,
3107 <strong>{@literal @}Assisted</strong> Money amount) {
3108 ...
3109 }
3110 }</pre>
3111
3112 <h3>Values are created by Guice</h3>
3113 Returned factories use child injectors to create values. The values are eligible for method
3114 interception. In addition, {@literal @}{@literal Inject} members will be injected before they are
3115 returned.
3116
3117 <h3>More configuration options</h3>
3118 In addition to simply specifying an implementation class for any returned type, factories' return
3119 values can be automatic or can be configured to use annotations:
3120 <p/>
3121 If you just want to return the types specified in the factory, do not configure any
3122 implementations:
3123
3124 <pre>public interface FruitFactory {
3125 Apple getApple(Color color);
3126 }
3127 ...
3128 protected void configure() {
3129 install(new FactoryModuleBuilder().build(FruitFactory.class));
3130 }</pre>
3131
3132 Note that any type returned by the factory in this manner needs to be an implementation class.
3133 <p/>
3134 To return two different implementations for the same interface from your factory, use binding
3135 annotations on your return types:
3136
3137 <pre>interface CarFactory {
3138 {@literal @}Named("fast") Car getFastCar(Color color);
3139 {@literal @}Named("clean") Car getCleanCar(Color color);
3140 }
3141 ...
3142 protected void configure() {
3143 install(new FactoryModuleBuilder()
3144 .implement(Car.class, Names.named("fast"), Porsche.class)
3145 .implement(Car.class, Names.named("clean"), Prius.class)
3146 .build(CarFactory.class));
3147 }</pre>
3148
3149 <h3>Implementation limitations</h3>
3150 As a limitation of the implementation, it is prohibited to declare a factory method that
3151 accepts a {@code Provider} as one of its arguments.
3152
3153 @since 3.0
3154 @author schmitt@google.com (Peter Schmitt)]]>
3155 </doc>
3156 </class>
3157 <!-- end class com.google.inject.assistedinject.FactoryModuleBuilder -->
3158 <!-- start class com.google.inject.assistedinject.FactoryProvider -->
3159 <class name="FactoryProvider" extends="java.lang.Object"
3160 abstract="false"
3161 static="false" final="false" visibility="public"
3162 deprecated="use {@link FactoryModuleBuilder} instead.">
3163 <implements name="com.google.inject.Provider&lt;F&gt;"/>
3164 <implements name="com.google.inject.spi.HasDependencies"/>
3165 <method name="newFactory" return="com.google.inject.Provider&lt;F&gt;"
3166 abstract="false" native="false" synchronized="false"
3167 static="true" final="false" visibility="public"
3168 deprecated="not deprecated">
3169 <param name="factoryType" type="java.lang.Class&lt;F&gt;"/>
3170 <param name="implementationType" type="java.lang.Class&lt;?&gt;"/>
3171 </method>
3172 <method name="newFactory" return="com.google.inject.Provider&lt;F&gt;"
3173 abstract="false" native="false" synchronized="false"
3174 static="true" final="false" visibility="public"
3175 deprecated="not deprecated">
3176 <param name="factoryType" type="com.google.inject.TypeLiteral&lt;F&gt;"/>
3177 <param name="implementationType" type="com.google.inject.TypeLiteral&lt;?&gt;"/>
3178 </method>
3179 <method name="getDependencies" return="java.util.Set&lt;com.google.inject.spi.Dependency&lt;?&gt;&gt;"
3180 abstract="false" native="false" synchronized="false"
3181 static="false" final="false" visibility="public"
3182 deprecated="not deprecated">
3183 </method>
3184 <method name="get" return="F"
3185 abstract="false" native="false" synchronized="false"
3186 static="false" final="false" visibility="public"
3187 deprecated="not deprecated">
3188 </method>
3189 <doc>
3190 <![CDATA[<strong>Obsolete.</strong> Prefer {@link FactoryModuleBuilder} for its more concise API and
3191 additional capability.
3192
3193 <p>Provides a factory that combines the caller's arguments with injector-supplied values to
3194 construct objects.
3195
3196 <h3>Defining a factory</h3>
3197 Create an interface whose methods return the constructed type, or any of its supertypes. The
3198 method's parameters are the arguments required to build the constructed type.
3199 <pre>public interface PaymentFactory {
3200 Payment create(Date startDate, Money amount);
3201 }</pre>
3202 You can name your factory methods whatever you like, such as <i>create</i>, <i>createPayment</i>
3203 or <i>newPayment</i>.
3204
3205 <h3>Creating a type that accepts factory parameters</h3>
3206 {@code constructedType} is a concrete class with an {@literal @}{@link Inject}-annotated
3207 constructor. In addition to injector-supplied parameters, the constructor should have
3208 parameters that match each of the factory method's parameters. Each factory-supplied parameter
3209 requires an {@literal @}{@link Assisted} annotation. This serves to document that the parameter
3210 is not bound by your application's modules.
3211 <pre>public class RealPayment implements Payment {
3212 {@literal @}Inject
3213 public RealPayment(
3214 CreditService creditService,
3215 AuthService authService,
3216 <strong>{@literal @}Assisted Date startDate</strong>,
3217 <strong>{@literal @}Assisted Money amount</strong>) {
3218 ...
3219 }
3220 }</pre>
3221 Any parameter that permits a null value should also be annotated {@code @Nullable}.
3222
3223 <h3>Configuring factories</h3>
3224 In your {@link com.google.inject.Module module}, bind the factory interface to the returned
3225 factory:
3226 <pre>bind(PaymentFactory.class).toProvider(
3227 FactoryProvider.newFactory(PaymentFactory.class, RealPayment.class));</pre>
3228 As a side-effect of this binding, Guice will inject the factory to initialize it for use. The
3229 factory cannot be used until the injector has been initialized.
3230
3231 <h3>Using the factory</h3>
3232 Inject your factory into your application classes. When you use the factory, your arguments
3233 will be combined with values from the injector to construct an instance.
3234 <pre>public class PaymentAction {
3235 {@literal @}Inject private PaymentFactory paymentFactory;
3236
3237 public void doPayment(Money amount) {
3238 Payment payment = paymentFactory.create(new Date(), amount);
3239 payment.apply();
3240 }
3241 }</pre>
3242
3243 <h3>Making parameter types distinct</h3>
3244 The types of the factory method's parameters must be distinct. To use multiple parameters of
3245 the same type, use a named {@literal @}{@link Assisted} annotation to disambiguate the
3246 parameters. The names must be applied to the factory method's parameters:
3247
3248 <pre>public interface PaymentFactory {
3249 Payment create(
3250 <strong>{@literal @}Assisted("startDate")</strong> Date startDate,
3251 <strong>{@literal @}Assisted("dueDate")</strong> Date dueDate,
3252 Money amount);
3253 } </pre>
3254 ...and to the concrete type's constructor parameters:
3255 <pre>public class RealPayment implements Payment {
3256 {@literal @}Inject
3257 public RealPayment(
3258 CreditService creditService,
3259 AuthService authService,
3260 <strong>{@literal @}Assisted("startDate")</strong> Date startDate,
3261 <strong>{@literal @}Assisted("dueDate")</strong> Date dueDate,
3262 <strong>{@literal @}Assisted</strong> Money amount) {
3263 ...
3264 }
3265 }</pre>
3266
3267 <h3>Values are created by Guice</h3>
3268 Returned factories use child injectors to create values. The values are eligible for method
3269 interception. In addition, {@literal @}{@literal Inject} members will be injected before they are
3270 returned.
3271
3272 <h3>Backwards compatibility using {@literal @}AssistedInject</h3>
3273 Instead of the {@literal @}Inject annotation, you may annotate the constructed classes with
3274 {@literal @}{@link AssistedInject}. This triggers a limited backwards-compatability mode.
3275
3276 <p>Instead of matching factory method arguments to constructor parameters using their names, the
3277 <strong>parameters are matched by their order</strong>. The first factory method argument is
3278 used for the first {@literal @}Assisted constructor parameter, etc.. Annotation names have no
3279 effect.
3280
3281 <p>Returned values are <strong>not created by Guice</strong>. These types are not eligible for
3282 method interception. They do receive post-construction member injection.
3283
3284 @param <F> The factory interface
3285
3286 @author jmourits@google.com (Jerome Mourits)
3287 @author jessewilson@google.com (Jesse Wilson)
3288 @author dtm@google.com (Daniel Martin)
3289
3290 @deprecated use {@link FactoryModuleBuilder} instead.]]>
3291 </doc>
3292 </class>
3293 <!-- end class com.google.inject.assistedinject.FactoryProvider -->
3294</package>
3295<package name="com.google.inject.binder">
3296 <!-- start interface com.google.inject.binder.AnnotatedBindingBuilder -->
3297 <interface name="AnnotatedBindingBuilder" abstract="true"
3298 static="false" final="false" visibility="public"
3299 deprecated="not deprecated">
3300 <implements name="com.google.inject.binder.LinkedBindingBuilder&lt;T&gt;"/>
3301 <method name="annotatedWith" return="com.google.inject.binder.LinkedBindingBuilder&lt;T&gt;"
3302 abstract="false" native="false" synchronized="false"
3303 static="false" final="false" visibility="public"
3304 deprecated="not deprecated">
3305 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
3306 <doc>
3307 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
3308 </doc>
3309 </method>
3310 <method name="annotatedWith" return="com.google.inject.binder.LinkedBindingBuilder&lt;T&gt;"
3311 abstract="false" native="false" synchronized="false"
3312 static="false" final="false" visibility="public"
3313 deprecated="not deprecated">
3314 <param name="annotation" type="java.lang.annotation.Annotation"/>
3315 <doc>
3316 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
3317 </doc>
3318 </method>
3319 <doc>
3320 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
3321
3322 @author crazybob@google.com (Bob Lee)]]>
3323 </doc>
3324 </interface>
3325 <!-- end interface com.google.inject.binder.AnnotatedBindingBuilder -->
3326 <!-- start interface com.google.inject.binder.AnnotatedConstantBindingBuilder -->
3327 <interface name="AnnotatedConstantBindingBuilder" abstract="true"
3328 static="false" final="false" visibility="public"
3329 deprecated="not deprecated">
3330 <method name="annotatedWith" return="com.google.inject.binder.ConstantBindingBuilder"
3331 abstract="false" native="false" synchronized="false"
3332 static="false" final="false" visibility="public"
3333 deprecated="not deprecated">
3334 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
3335 <doc>
3336 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
3337 </doc>
3338 </method>
3339 <method name="annotatedWith" return="com.google.inject.binder.ConstantBindingBuilder"
3340 abstract="false" native="false" synchronized="false"
3341 static="false" final="false" visibility="public"
3342 deprecated="not deprecated">
3343 <param name="annotation" type="java.lang.annotation.Annotation"/>
3344 <doc>
3345 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
3346 </doc>
3347 </method>
3348 <doc>
3349 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
3350
3351 @author crazybob@google.com (Bob Lee)]]>
3352 </doc>
3353 </interface>
3354 <!-- end interface com.google.inject.binder.AnnotatedConstantBindingBuilder -->
3355 <!-- start interface com.google.inject.binder.AnnotatedElementBuilder -->
3356 <interface name="AnnotatedElementBuilder" abstract="true"
3357 static="false" final="false" visibility="public"
3358 deprecated="not deprecated">
3359 <method name="annotatedWith"
3360 abstract="false" native="false" synchronized="false"
3361 static="false" final="false" visibility="public"
3362 deprecated="not deprecated">
3363 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
3364 <doc>
3365 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
3366 </doc>
3367 </method>
3368 <method name="annotatedWith"
3369 abstract="false" native="false" synchronized="false"
3370 static="false" final="false" visibility="public"
3371 deprecated="not deprecated">
3372 <param name="annotation" type="java.lang.annotation.Annotation"/>
3373 <doc>
3374 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
3375 </doc>
3376 </method>
3377 <doc>
3378 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
3379
3380 @author jessewilson@google.com (Jesse Wilson)
3381 @since 2.0]]>
3382 </doc>
3383 </interface>
3384 <!-- end interface com.google.inject.binder.AnnotatedElementBuilder -->
3385 <!-- start interface com.google.inject.binder.ConstantBindingBuilder -->
3386 <interface name="ConstantBindingBuilder" abstract="true"
3387 static="false" final="false" visibility="public"
3388 deprecated="not deprecated">
3389 <method name="to"
3390 abstract="false" native="false" synchronized="false"
3391 static="false" final="false" visibility="public"
3392 deprecated="not deprecated">
3393 <param name="value" type="java.lang.String"/>
3394 <doc>
3395 <![CDATA[Binds constant to the given value.]]>
3396 </doc>
3397 </method>
3398 <method name="to"
3399 abstract="false" native="false" synchronized="false"
3400 static="false" final="false" visibility="public"
3401 deprecated="not deprecated">
3402 <param name="value" type="int"/>
3403 <doc>
3404 <![CDATA[Binds constant to the given value.]]>
3405 </doc>
3406 </method>
3407 <method name="to"
3408 abstract="false" native="false" synchronized="false"
3409 static="false" final="false" visibility="public"
3410 deprecated="not deprecated">
3411 <param name="value" type="long"/>
3412 <doc>
3413 <![CDATA[Binds constant to the given value.]]>
3414 </doc>
3415 </method>
3416 <method name="to"
3417 abstract="false" native="false" synchronized="false"
3418 static="false" final="false" visibility="public"
3419 deprecated="not deprecated">
3420 <param name="value" type="boolean"/>
3421 <doc>
3422 <![CDATA[Binds constant to the given value.]]>
3423 </doc>
3424 </method>
3425 <method name="to"
3426 abstract="false" native="false" synchronized="false"
3427 static="false" final="false" visibility="public"
3428 deprecated="not deprecated">
3429 <param name="value" type="double"/>
3430 <doc>
3431 <![CDATA[Binds constant to the given value.]]>
3432 </doc>
3433 </method>
3434 <method name="to"
3435 abstract="false" native="false" synchronized="false"
3436 static="false" final="false" visibility="public"
3437 deprecated="not deprecated">
3438 <param name="value" type="float"/>
3439 <doc>
3440 <![CDATA[Binds constant to the given value.]]>
3441 </doc>
3442 </method>
3443 <method name="to"
3444 abstract="false" native="false" synchronized="false"
3445 static="false" final="false" visibility="public"
3446 deprecated="not deprecated">
3447 <param name="value" type="short"/>
3448 <doc>
3449 <![CDATA[Binds constant to the given value.]]>
3450 </doc>
3451 </method>
3452 <method name="to"
3453 abstract="false" native="false" synchronized="false"
3454 static="false" final="false" visibility="public"
3455 deprecated="not deprecated">
3456 <param name="value" type="char"/>
3457 <doc>
3458 <![CDATA[Binds constant to the given value.]]>
3459 </doc>
3460 </method>
3461 <method name="to"
3462 abstract="false" native="false" synchronized="false"
3463 static="false" final="false" visibility="public"
3464 deprecated="not deprecated">
3465 <param name="value" type="byte"/>
3466 <doc>
3467 <![CDATA[Binds constant to the given value.
3468
3469 @since 3.0]]>
3470 </doc>
3471 </method>
3472 <method name="to"
3473 abstract="false" native="false" synchronized="false"
3474 static="false" final="false" visibility="public"
3475 deprecated="not deprecated">
3476 <param name="value" type="java.lang.Class&lt;?&gt;"/>
3477 <doc>
3478 <![CDATA[Binds constant to the given value.]]>
3479 </doc>
3480 </method>
3481 <method name="to"
3482 abstract="false" native="false" synchronized="false"
3483 static="false" final="false" visibility="public"
3484 deprecated="not deprecated">
3485 <param name="value" type="E extends java.lang.Enum&lt;E&gt;"/>
3486 <doc>
3487 <![CDATA[Binds constant to the given value.]]>
3488 </doc>
3489 </method>
3490 <doc>
3491 <![CDATA[Binds to a constant value.]]>
3492 </doc>
3493 </interface>
3494 <!-- end interface com.google.inject.binder.ConstantBindingBuilder -->
3495 <!-- start interface com.google.inject.binder.LinkedBindingBuilder -->
3496 <interface name="LinkedBindingBuilder" abstract="true"
3497 static="false" final="false" visibility="public"
3498 deprecated="not deprecated">
3499 <implements name="com.google.inject.binder.ScopedBindingBuilder"/>
3500 <method name="to" return="com.google.inject.binder.ScopedBindingBuilder"
3501 abstract="false" native="false" synchronized="false"
3502 static="false" final="false" visibility="public"
3503 deprecated="not deprecated">
3504 <param name="implementation" type="java.lang.Class&lt;? extends T&gt;"/>
3505 <doc>
3506 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
3507 </doc>
3508 </method>
3509 <method name="to" return="com.google.inject.binder.ScopedBindingBuilder"
3510 abstract="false" native="false" synchronized="false"
3511 static="false" final="false" visibility="public"
3512 deprecated="not deprecated">
3513 <param name="implementation" type="com.google.inject.TypeLiteral&lt;? extends T&gt;"/>
3514 <doc>
3515 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
3516 </doc>
3517 </method>
3518 <method name="to" return="com.google.inject.binder.ScopedBindingBuilder"
3519 abstract="false" native="false" synchronized="false"
3520 static="false" final="false" visibility="public"
3521 deprecated="not deprecated">
3522 <param name="targetKey" type="com.google.inject.Key&lt;? extends T&gt;"/>
3523 <doc>
3524 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
3525 </doc>
3526 </method>
3527 <method name="toInstance"
3528 abstract="false" native="false" synchronized="false"
3529 static="false" final="false" visibility="public"
3530 deprecated="not deprecated">
3531 <param name="instance" type="T"/>
3532 <doc>
3533 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
3534
3535 @see com.google.inject.Injector#injectMembers]]>
3536 </doc>
3537 </method>
3538 <method name="toProvider" return="com.google.inject.binder.ScopedBindingBuilder"
3539 abstract="false" native="false" synchronized="false"
3540 static="false" final="false" visibility="public"
3541 deprecated="not deprecated">
3542 <param name="provider" type="com.google.inject.Provider&lt;? extends T&gt;"/>
3543 <doc>
3544 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
3545
3546 @see com.google.inject.Injector#injectMembers]]>
3547 </doc>
3548 </method>
3549 <method name="toProvider" return="com.google.inject.binder.ScopedBindingBuilder"
3550 abstract="false" native="false" synchronized="false"
3551 static="false" final="false" visibility="public"
3552 deprecated="not deprecated">
3553 <param name="providerType" type="java.lang.Class&lt;? extends javax.inject.Provider&lt;? extends T&gt;&gt;"/>
3554 <doc>
3555 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
3556 </doc>
3557 </method>
3558 <method name="toProvider" return="com.google.inject.binder.ScopedBindingBuilder"
3559 abstract="false" native="false" synchronized="false"
3560 static="false" final="false" visibility="public"
3561 deprecated="not deprecated">
3562 <param name="providerType" type="com.google.inject.TypeLiteral&lt;? extends javax.inject.Provider&lt;? extends T&gt;&gt;"/>
3563 <doc>
3564 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
3565 </doc>
3566 </method>
3567 <method name="toProvider" return="com.google.inject.binder.ScopedBindingBuilder"
3568 abstract="false" native="false" synchronized="false"
3569 static="false" final="false" visibility="public"
3570 deprecated="not deprecated">
3571 <param name="providerKey" type="com.google.inject.Key&lt;? extends javax.inject.Provider&lt;? extends T&gt;&gt;"/>
3572 <doc>
3573 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
3574 </doc>
3575 </method>
3576 <method name="toConstructor" return="com.google.inject.binder.ScopedBindingBuilder"
3577 abstract="false" native="false" synchronized="false"
3578 static="false" final="false" visibility="public"
3579 deprecated="not deprecated">
3580 <param name="constructor" type="java.lang.reflect.Constructor&lt;S&gt;"/>
3581 <doc>
3582 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
3583
3584 @since 3.0]]>
3585 </doc>
3586 </method>
3587 <method name="toConstructor" return="com.google.inject.binder.ScopedBindingBuilder"
3588 abstract="false" native="false" synchronized="false"
3589 static="false" final="false" visibility="public"
3590 deprecated="not deprecated">
3591 <param name="constructor" type="java.lang.reflect.Constructor&lt;S&gt;"/>
3592 <param name="type" type="com.google.inject.TypeLiteral&lt;? extends S&gt;"/>
3593 <doc>
3594 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
3595
3596 @since 3.0]]>
3597 </doc>
3598 </method>
3599 <doc>
3600 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
3601
3602 @author crazybob@google.com (Bob Lee)]]>
3603 </doc>
3604 </interface>
3605 <!-- end interface com.google.inject.binder.LinkedBindingBuilder -->
3606 <!-- start interface com.google.inject.binder.ScopedBindingBuilder -->
3607 <interface name="ScopedBindingBuilder" abstract="true"
3608 static="false" final="false" visibility="public"
3609 deprecated="not deprecated">
3610 <method name="in"
3611 abstract="false" native="false" synchronized="false"
3612 static="false" final="false" visibility="public"
3613 deprecated="not deprecated">
3614 <param name="scopeAnnotation" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
3615 <doc>
3616 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
3617 </doc>
3618 </method>
3619 <method name="in"
3620 abstract="false" native="false" synchronized="false"
3621 static="false" final="false" visibility="public"
3622 deprecated="not deprecated">
3623 <param name="scope" type="com.google.inject.Scope"/>
3624 <doc>
3625 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.]]>
3626 </doc>
3627 </method>
3628 <method name="asEagerSingleton"
3629 abstract="false" native="false" synchronized="false"
3630 static="false" final="false" visibility="public"
3631 deprecated="not deprecated">
3632 <doc>
3633 <![CDATA[Instructs the {@link com.google.inject.Injector} to eagerly initialize this
3634 singleton-scoped binding upon creation. Useful for application
3635 initialization logic. See the EDSL examples at
3636 {@link com.google.inject.Binder}.]]>
3637 </doc>
3638 </method>
3639 <doc>
3640 <![CDATA[See the EDSL examples at {@link com.google.inject.Binder}.
3641
3642 @author crazybob@google.com (Bob Lee)]]>
3643 </doc>
3644 </interface>
3645 <!-- end interface com.google.inject.binder.ScopedBindingBuilder -->
3646</package>
3647<package name="com.google.inject.jndi">
3648 <!-- start class com.google.inject.jndi.JndiIntegration -->
3649 <class name="JndiIntegration" extends="java.lang.Object"
3650 abstract="false"
3651 static="false" final="false" visibility="public"
3652 deprecated="not deprecated">
3653 <method name="fromJndi" return="com.google.inject.Provider&lt;T&gt;"
3654 abstract="false" native="false" synchronized="false"
3655 static="true" final="false" visibility="public"
3656 deprecated="not deprecated">
3657 <param name="type" type="java.lang.Class&lt;T&gt;"/>
3658 <param name="name" type="java.lang.String"/>
3659 <doc>
3660 <![CDATA[Creates a provider which looks up objects in JNDI using the given name.
3661 Example usage:
3662
3663 <pre>
3664 bind(DataSource.class).toProvider(fromJndi(DataSource.class, "java:..."));
3665 </pre>]]>
3666 </doc>
3667 </method>
3668 <doc>
3669 <![CDATA[Integrates Guice with JNDI. Requires a binding to
3670 {@link javax.naming.Context}.
3671
3672 @author crazybob@google.com (Bob Lee)]]>
3673 </doc>
3674 </class>
3675 <!-- end class com.google.inject.jndi.JndiIntegration -->
3676</package>
3677<package name="com.google.inject.matcher">
3678 <!-- start class com.google.inject.matcher.AbstractMatcher -->
3679 <class name="AbstractMatcher" extends="java.lang.Object"
3680 abstract="true"
3681 static="false" final="false" visibility="public"
3682 deprecated="not deprecated">
3683 <implements name="com.google.inject.matcher.Matcher&lt;T&gt;"/>
3684 <constructor name="AbstractMatcher"
3685 static="false" final="false" visibility="public"
3686 deprecated="not deprecated">
3687 </constructor>
3688 <method name="and" return="com.google.inject.matcher.Matcher&lt;T&gt;"
3689 abstract="false" native="false" synchronized="false"
3690 static="false" final="false" visibility="public"
3691 deprecated="not deprecated">
3692 <param name="other" type="com.google.inject.matcher.Matcher&lt;? super T&gt;"/>
3693 </method>
3694 <method name="or" return="com.google.inject.matcher.Matcher&lt;T&gt;"
3695 abstract="false" native="false" synchronized="false"
3696 static="false" final="false" visibility="public"
3697 deprecated="not deprecated">
3698 <param name="other" type="com.google.inject.matcher.Matcher&lt;? super T&gt;"/>
3699 </method>
3700 <doc>
3701 <![CDATA[Implements {@code and()} and {@code or()}.
3702
3703 @author crazybob@google.com (Bob Lee)]]>
3704 </doc>
3705 </class>
3706 <!-- end class com.google.inject.matcher.AbstractMatcher -->
3707 <!-- start interface com.google.inject.matcher.Matcher -->
3708 <interface name="Matcher" abstract="true"
3709 static="false" final="false" visibility="public"
3710 deprecated="not deprecated">
3711 <method name="matches" return="boolean"
3712 abstract="false" native="false" synchronized="false"
3713 static="false" final="false" visibility="public"
3714 deprecated="not deprecated">
3715 <param name="t" type="T"/>
3716 <doc>
3717 <![CDATA[Returns {@code true} if this matches {@code t}, {@code false} otherwise.]]>
3718 </doc>
3719 </method>
3720 <method name="and" return="com.google.inject.matcher.Matcher&lt;T&gt;"
3721 abstract="false" native="false" synchronized="false"
3722 static="false" final="false" visibility="public"
3723 deprecated="not deprecated">
3724 <param name="other" type="com.google.inject.matcher.Matcher&lt;? super T&gt;"/>
3725 <doc>
3726 <![CDATA[Returns a new matcher which returns {@code true} if both this and the
3727 given matcher return {@code true}.]]>
3728 </doc>
3729 </method>
3730 <method name="or" return="com.google.inject.matcher.Matcher&lt;T&gt;"
3731 abstract="false" native="false" synchronized="false"
3732 static="false" final="false" visibility="public"
3733 deprecated="not deprecated">
3734 <param name="other" type="com.google.inject.matcher.Matcher&lt;? super T&gt;"/>
3735 <doc>
3736 <![CDATA[Returns a new matcher which returns {@code true} if either this or the
3737 given matcher return {@code true}.]]>
3738 </doc>
3739 </method>
3740 <doc>
3741 <![CDATA[Returns {@code true} or {@code false} for a given input.
3742
3743 @author crazybob@google.com (Bob Lee)]]>
3744 </doc>
3745 </interface>
3746 <!-- end interface com.google.inject.matcher.Matcher -->
3747 <!-- start class com.google.inject.matcher.Matchers -->
3748 <class name="Matchers" extends="java.lang.Object"
3749 abstract="false"
3750 static="false" final="false" visibility="public"
3751 deprecated="not deprecated">
3752 <method name="any" return="com.google.inject.matcher.Matcher&lt;java.lang.Object&gt;"
3753 abstract="false" native="false" synchronized="false"
3754 static="true" final="false" visibility="public"
3755 deprecated="not deprecated">
3756 <doc>
3757 <![CDATA[Returns a matcher which matches any input.]]>
3758 </doc>
3759 </method>
3760 <method name="not" return="com.google.inject.matcher.Matcher&lt;T&gt;"
3761 abstract="false" native="false" synchronized="false"
3762 static="true" final="false" visibility="public"
3763 deprecated="not deprecated">
3764 <param name="p" type="com.google.inject.matcher.Matcher&lt;? super T&gt;"/>
3765 <doc>
3766 <![CDATA[Inverts the given matcher.]]>
3767 </doc>
3768 </method>
3769 <method name="annotatedWith" return="com.google.inject.matcher.Matcher&lt;java.lang.reflect.AnnotatedElement&gt;"
3770 abstract="false" native="false" synchronized="false"
3771 static="true" final="false" visibility="public"
3772 deprecated="not deprecated">
3773 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
3774 <doc>
3775 <![CDATA[Returns a matcher which matches elements (methods, classes, etc.)
3776 with a given annotation.]]>
3777 </doc>
3778 </method>
3779 <method name="annotatedWith" return="com.google.inject.matcher.Matcher&lt;java.lang.reflect.AnnotatedElement&gt;"
3780 abstract="false" native="false" synchronized="false"
3781 static="true" final="false" visibility="public"
3782 deprecated="not deprecated">
3783 <param name="annotation" type="java.lang.annotation.Annotation"/>
3784 <doc>
3785 <![CDATA[Returns a matcher which matches elements (methods, classes, etc.)
3786 with a given annotation.]]>
3787 </doc>
3788 </method>
3789 <method name="subclassesOf" return="com.google.inject.matcher.Matcher&lt;java.lang.Class&gt;"
3790 abstract="false" native="false" synchronized="false"
3791 static="true" final="false" visibility="public"
3792 deprecated="not deprecated">
3793 <param name="superclass" type="java.lang.Class&lt;?&gt;"/>
3794 <doc>
3795 <![CDATA[Returns a matcher which matches subclasses of the given type (as well as
3796 the given type).]]>
3797 </doc>
3798 </method>
3799 <method name="only" return="com.google.inject.matcher.Matcher&lt;java.lang.Object&gt;"
3800 abstract="false" native="false" synchronized="false"
3801 static="true" final="false" visibility="public"
3802 deprecated="not deprecated">
3803 <param name="value" type="java.lang.Object"/>
3804 <doc>
3805 <![CDATA[Returns a matcher which matches objects equal to the given object.]]>
3806 </doc>
3807 </method>
3808 <method name="identicalTo" return="com.google.inject.matcher.Matcher&lt;java.lang.Object&gt;"
3809 abstract="false" native="false" synchronized="false"
3810 static="true" final="false" visibility="public"
3811 deprecated="not deprecated">
3812 <param name="value" type="java.lang.Object"/>
3813 <doc>
3814 <![CDATA[Returns a matcher which matches only the given object.]]>
3815 </doc>
3816 </method>
3817 <method name="inPackage" return="com.google.inject.matcher.Matcher&lt;java.lang.Class&gt;"
3818 abstract="false" native="false" synchronized="false"
3819 static="true" final="false" visibility="public"
3820 deprecated="not deprecated">
3821 <param name="targetPackage" type="java.lang.Package"/>
3822 <doc>
3823 <![CDATA[Returns a matcher which matches classes in the given package. Packages are specific to their
3824 classloader, so classes with the same package name may not have the same package at runtime.]]>
3825 </doc>
3826 </method>
3827 <method name="inSubpackage" return="com.google.inject.matcher.Matcher&lt;java.lang.Class&gt;"
3828 abstract="false" native="false" synchronized="false"
3829 static="true" final="false" visibility="public"
3830 deprecated="not deprecated">
3831 <param name="targetPackageName" type="java.lang.String"/>
3832 <doc>
3833 <![CDATA[Returns a matcher which matches classes in the given package and its subpackages. Unlike
3834 {@link #inPackage(Package) inPackage()}, this matches classes from any classloader.
3835
3836 @since 2.0]]>
3837 </doc>
3838 </method>
3839 <method name="returns" return="com.google.inject.matcher.Matcher&lt;java.lang.reflect.Method&gt;"
3840 abstract="false" native="false" synchronized="false"
3841 static="true" final="false" visibility="public"
3842 deprecated="not deprecated">
3843 <param name="returnType" type="com.google.inject.matcher.Matcher&lt;? super java.lang.Class&lt;?&gt;&gt;"/>
3844 <doc>
3845 <![CDATA[Returns a matcher which matches methods with matching return types.]]>
3846 </doc>
3847 </method>
3848 <doc>
3849 <![CDATA[Matcher implementations. Supports matching classes and methods.
3850
3851 @author crazybob@google.com (Bob Lee)]]>
3852 </doc>
3853 </class>
3854 <!-- end class com.google.inject.matcher.Matchers -->
3855</package>
3856<package name="com.google.inject.multibindings">
3857 <!-- start class com.google.inject.multibindings.MapBinder -->
3858 <class name="MapBinder" extends="java.lang.Object"
3859 abstract="true"
3860 static="false" final="false" visibility="public"
3861 deprecated="not deprecated">
3862 <method name="newMapBinder" return="com.google.inject.multibindings.MapBinder&lt;K, V&gt;"
3863 abstract="false" native="false" synchronized="false"
3864 static="true" final="false" visibility="public"
3865 deprecated="not deprecated">
3866 <param name="binder" type="com.google.inject.Binder"/>
3867 <param name="keyType" type="com.google.inject.TypeLiteral&lt;K&gt;"/>
3868 <param name="valueType" type="com.google.inject.TypeLiteral&lt;V&gt;"/>
3869 <doc>
3870 <![CDATA[Returns a new mapbinder that collects entries of {@code keyType}/{@code valueType} in a
3871 {@link Map} that is itself bound with no binding annotation.]]>
3872 </doc>
3873 </method>
3874 <method name="newMapBinder" return="com.google.inject.multibindings.MapBinder&lt;K, V&gt;"
3875 abstract="false" native="false" synchronized="false"
3876 static="true" final="false" visibility="public"
3877 deprecated="not deprecated">
3878 <param name="binder" type="com.google.inject.Binder"/>
3879 <param name="keyType" type="java.lang.Class&lt;K&gt;"/>
3880 <param name="valueType" type="java.lang.Class&lt;V&gt;"/>
3881 <doc>
3882 <![CDATA[Returns a new mapbinder that collects entries of {@code keyType}/{@code valueType} in a
3883 {@link Map} that is itself bound with no binding annotation.]]>
3884 </doc>
3885 </method>
3886 <method name="newMapBinder" return="com.google.inject.multibindings.MapBinder&lt;K, V&gt;"
3887 abstract="false" native="false" synchronized="false"
3888 static="true" final="false" visibility="public"
3889 deprecated="not deprecated">
3890 <param name="binder" type="com.google.inject.Binder"/>
3891 <param name="keyType" type="com.google.inject.TypeLiteral&lt;K&gt;"/>
3892 <param name="valueType" type="com.google.inject.TypeLiteral&lt;V&gt;"/>
3893 <param name="annotation" type="java.lang.annotation.Annotation"/>
3894 <doc>
3895 <![CDATA[Returns a new mapbinder that collects entries of {@code keyType}/{@code valueType} in a
3896 {@link Map} that is itself bound with {@code annotation}.]]>
3897 </doc>
3898 </method>
3899 <method name="newMapBinder" return="com.google.inject.multibindings.MapBinder&lt;K, V&gt;"
3900 abstract="false" native="false" synchronized="false"
3901 static="true" final="false" visibility="public"
3902 deprecated="not deprecated">
3903 <param name="binder" type="com.google.inject.Binder"/>
3904 <param name="keyType" type="java.lang.Class&lt;K&gt;"/>
3905 <param name="valueType" type="java.lang.Class&lt;V&gt;"/>
3906 <param name="annotation" type="java.lang.annotation.Annotation"/>
3907 <doc>
3908 <![CDATA[Returns a new mapbinder that collects entries of {@code keyType}/{@code valueType} in a
3909 {@link Map} that is itself bound with {@code annotation}.]]>
3910 </doc>
3911 </method>
3912 <method name="newMapBinder" return="com.google.inject.multibindings.MapBinder&lt;K, V&gt;"
3913 abstract="false" native="false" synchronized="false"
3914 static="true" final="false" visibility="public"
3915 deprecated="not deprecated">
3916 <param name="binder" type="com.google.inject.Binder"/>
3917 <param name="keyType" type="com.google.inject.TypeLiteral&lt;K&gt;"/>
3918 <param name="valueType" type="com.google.inject.TypeLiteral&lt;V&gt;"/>
3919 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
3920 <doc>
3921 <![CDATA[Returns a new mapbinder that collects entries of {@code keyType}/{@code valueType} in a
3922 {@link Map} that is itself bound with {@code annotationType}.]]>
3923 </doc>
3924 </method>
3925 <method name="newMapBinder" return="com.google.inject.multibindings.MapBinder&lt;K, V&gt;"
3926 abstract="false" native="false" synchronized="false"
3927 static="true" final="false" visibility="public"
3928 deprecated="not deprecated">
3929 <param name="binder" type="com.google.inject.Binder"/>
3930 <param name="keyType" type="java.lang.Class&lt;K&gt;"/>
3931 <param name="valueType" type="java.lang.Class&lt;V&gt;"/>
3932 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
3933 <doc>
3934 <![CDATA[Returns a new mapbinder that collects entries of {@code keyType}/{@code valueType} in a
3935 {@link Map} that is itself bound with {@code annotationType}.]]>
3936 </doc>
3937 </method>
3938 <method name="permitDuplicates" return="com.google.inject.multibindings.MapBinder&lt;K, V&gt;"
3939 abstract="true" native="false" synchronized="false"
3940 static="false" final="false" visibility="public"
3941 deprecated="not deprecated">
3942 <doc>
3943 <![CDATA[Configures the {@code MapBinder} to handle duplicate entries.
3944 <p>When multiple equal keys are bound, the value that gets included in the map is
3945 arbitrary.
3946 <p>In addition to the {@code Map<K, V>} and {@code Map<K, Provider<V>>}
3947 maps that are normally bound, a {@code Map<K, Set<V>>} and
3948 {@code Map<K, Set<Provider<V>>>} are <em>also</em> bound, which contain
3949 all values bound to each key.
3950 <p>
3951 When multiple modules contribute elements to the map, this configuration
3952 option impacts all of them.
3953
3954 @return this map binder
3955 @since 3.0]]>
3956 </doc>
3957 </method>
3958 <method name="addBinding" return="com.google.inject.binder.LinkedBindingBuilder&lt;V&gt;"
3959 abstract="true" native="false" synchronized="false"
3960 static="false" final="false" visibility="public"
3961 deprecated="not deprecated">
3962 <param name="key" type="K"/>
3963 <doc>
3964 <![CDATA[Returns a binding builder used to add a new entry in the map. Each
3965 key must be distinct (and non-null). Bound providers will be evaluated each
3966 time the map is injected.
3967
3968 <p>It is an error to call this method without also calling one of the
3969 {@code to} methods on the returned binding builder.
3970
3971 <p>Scoping elements independently is supported. Use the {@code in} method
3972 to specify a binding scope.]]>
3973 </doc>
3974 </method>
3975 <doc>
3976 <![CDATA[An API to bind multiple map entries separately, only to later inject them as
3977 a complete map. MapBinder is intended for use in your application's module:
3978 <pre><code>
3979 public class SnacksModule extends AbstractModule {
3980 protected void configure() {
3981 MapBinder&lt;String, Snack&gt; mapbinder
3982 = MapBinder.newMapBinder(binder(), String.class, Snack.class);
3983 mapbinder.addBinding("twix").toInstance(new Twix());
3984 mapbinder.addBinding("snickers").toProvider(SnickersProvider.class);
3985 mapbinder.addBinding("skittles").to(Skittles.class);
3986 }
3987 }</code></pre>
3988
3989 <p>With this binding, a {@link Map}{@code <String, Snack>} can now be
3990 injected:
3991 <pre><code>
3992 class SnackMachine {
3993 {@literal @}Inject
3994 public SnackMachine(Map&lt;String, Snack&gt; snacks) { ... }
3995 }</code></pre>
3996
3997 <p>In addition to binding {@code Map<K, V>}, a mapbinder will also bind
3998 {@code Map<K, Provider<V>>} for lazy value provision:
3999 <pre><code>
4000 class SnackMachine {
4001 {@literal @}Inject
4002 public SnackMachine(Map&lt;String, Provider&lt;Snack&gt;&gt; snackProviders) { ... }
4003 }</code></pre>
4004
4005 <p>Contributing mapbindings from different modules is supported. For example,
4006 it is okay to have both {@code CandyModule} and {@code ChipsModule} both
4007 create their own {@code MapBinder<String, Snack>}, and to each contribute
4008 bindings to the snacks map. When that map is injected, it will contain
4009 entries from both modules.
4010
4011 <p>The map's iteration order is consistent with the binding order. This is
4012 convenient when multiple elements are contributed by the same module because
4013 that module can order its bindings appropriately. Avoid relying on the
4014 iteration order of elements contributed by different modules, since there is
4015 no equivalent mechanism to order modules.
4016
4017 <p>The map is unmodifiable. Elements can only be added to the map by
4018 configuring the MapBinder. Elements can never be removed from the map.
4019
4020 <p>Values are resolved at map injection time. If a value is bound to a
4021 provider, that provider's get method will be called each time the map is
4022 injected (unless the binding is also scoped, or a map of providers is injected).
4023
4024 <p>Annotations are used to create different maps of the same key/value
4025 type. Each distinct annotation gets its own independent map.
4026
4027 <p><strong>Keys must be distinct.</strong> If the same key is bound more than
4028 once, map injection will fail. However, use {@link #permitDuplicates()} in
4029 order to allow duplicate keys; extra bindings to {@code Map<K, Set<V>>} and
4030 {@code Map<K, Set<Provider<V>>} will be added.
4031
4032 <p><strong>Keys must be non-null.</strong> {@code addBinding(null)} will
4033 throw an unchecked exception.
4034
4035 <p><strong>Values must be non-null to use map injection.</strong> If any
4036 value is null, map injection will fail (although injecting a map of providers
4037 will not).
4038
4039 @author dpb@google.com (David P. Baker)]]>
4040 </doc>
4041 </class>
4042 <!-- end class com.google.inject.multibindings.MapBinder -->
4043 <!-- start interface com.google.inject.multibindings.MapBinderBinding -->
4044 <interface name="MapBinderBinding" abstract="true"
4045 static="false" final="false" visibility="public"
4046 deprecated="not deprecated">
4047 <method name="getMapKey" return="com.google.inject.Key&lt;T&gt;"
4048 abstract="false" native="false" synchronized="false"
4049 static="false" final="false" visibility="public"
4050 deprecated="not deprecated">
4051 <doc>
4052 <![CDATA[Returns the {@link Key} for the map.]]>
4053 </doc>
4054 </method>
4055 <method name="getKeyTypeLiteral" return="com.google.inject.TypeLiteral&lt;?&gt;"
4056 abstract="false" native="false" synchronized="false"
4057 static="false" final="false" visibility="public"
4058 deprecated="not deprecated">
4059 <doc>
4060 <![CDATA[Returns the TypeLiteral describing the keys of the map.
4061 <p>
4062 The TypeLiteral will always match the type Map's generic type. For example, if getMapKey
4063 returns a key of <code>Map&lt;String, Snack></code>, then this will always return a
4064 <code>TypeLiteral&lt;String></code>.]]>
4065 </doc>
4066 </method>
4067 <method name="getValueTypeLiteral" return="com.google.inject.TypeLiteral&lt;?&gt;"
4068 abstract="false" native="false" synchronized="false"
4069 static="false" final="false" visibility="public"
4070 deprecated="not deprecated">
4071 <doc>
4072 <![CDATA[Returns the TypeLiteral describing the values of the map.
4073 <p>
4074 The TypeLiteral will always match the type Map's generic type. For example, if getMapKey
4075 returns a key of <code>Map&lt;String, Snack></code>, then this will always return a
4076 <code>TypeLiteral&lt;Snack></code>.]]>
4077 </doc>
4078 </method>
4079 <method name="getEntries" return="java.util.List&lt;java.util.Map.Entry&lt;?, com.google.inject.Binding&lt;?&gt;&gt;&gt;"
4080 abstract="false" native="false" synchronized="false"
4081 static="false" final="false" visibility="public"
4082 deprecated="not deprecated">
4083 <doc>
4084 <![CDATA[Returns all entries in the Map. The returned list of Map.Entries contains the key and a binding
4085 to the value. Duplicate keys or values will exist as separate Map.Entries in the returned list.
4086 This is only supported on bindings returned from an injector. This will throw
4087 {@link UnsupportedOperationException} if it is called on an element retrieved from
4088 {@link Elements#getElements}.
4089 <p>
4090 The elements will always match the type Map's generic type. For example, if getMapKey returns a
4091 key of <code>Map&lt;String, Snack></code>, then this will always return a list of type
4092 <code>List&lt;Map.Entry&lt;String, Binding&lt;Snack>>></code>.]]>
4093 </doc>
4094 </method>
4095 <method name="permitsDuplicates" return="boolean"
4096 abstract="false" native="false" synchronized="false"
4097 static="false" final="false" visibility="public"
4098 deprecated="not deprecated">
4099 <doc>
4100 <![CDATA[Returns true if the MapBinder permits duplicates. This is only supported on bindings returned
4101 from an injector. This will throw {@link UnsupportedOperationException} if it is called on a
4102 MapBinderBinding retrieved from {@link Elements#getElements}.]]>
4103 </doc>
4104 </method>
4105 <method name="containsElement" return="boolean"
4106 abstract="false" native="false" synchronized="false"
4107 static="false" final="false" visibility="public"
4108 deprecated="not deprecated">
4109 <param name="element" type="com.google.inject.spi.Element"/>
4110 <doc>
4111 <![CDATA[Returns true if this MapBinder contains the given Element in order to build the map or uses the
4112 given Element in order to support building and injecting the map. This will work for
4113 MapBinderBindings retrieved from an injector and {@link Elements#getElements}. Usually this is
4114 only necessary if you are working with elements retrieved from modules (without an Injector),
4115 otherwise {@link #getEntries} and {@link #permitsDuplicates} are better options.
4116 <p>
4117 If you need to introspect the details of the map, such as the keys, values or if it permits
4118 duplicates, it is necessary to pass the elements through an Injector and use
4119 {@link #getEntries()} and {@link #permitsDuplicates()}.]]>
4120 </doc>
4121 </method>
4122 <doc>
4123 <![CDATA[A binding for a MapBinder.
4124 <p>
4125 Although MapBinders may be injected through a variety of generic types (Map&lt;K, V>, Map
4126 &lt;K, Provider&lt;V>>, Map&lt;K, Set&lt;V>>, Map<K, Set&lt;
4127 Provider&lt;V>>, and even Set&lt;Map.Entry&lt;K, Provider&lt;V>>), a
4128 MapBinderBinding exists only on the Binding associated with the Map&lt;K, V> key. Other
4129 bindings can be validated to be derived from this MapBinderBinding using
4130 {@link #containsElement(Element)}.
4131
4132 @param <T> The fully qualified type of the map, including Map. For example:
4133 <code>MapBinderBinding&lt;Map&lt;String, Snack>></code>
4134
4135 @since 3.0
4136 @author sameb@google.com (Sam Berlin)]]>
4137 </doc>
4138 </interface>
4139 <!-- end interface com.google.inject.multibindings.MapBinderBinding -->
4140 <!-- start class com.google.inject.multibindings.Multibinder -->
4141 <class name="Multibinder" extends="java.lang.Object"
4142 abstract="true"
4143 static="false" final="false" visibility="public"
4144 deprecated="not deprecated">
4145 <method name="newSetBinder" return="com.google.inject.multibindings.Multibinder&lt;T&gt;"
4146 abstract="false" native="false" synchronized="false"
4147 static="true" final="false" visibility="public"
4148 deprecated="not deprecated">
4149 <param name="binder" type="com.google.inject.Binder"/>
4150 <param name="type" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
4151 <doc>
4152 <![CDATA[Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is
4153 itself bound with no binding annotation.]]>
4154 </doc>
4155 </method>
4156 <method name="newSetBinder" return="com.google.inject.multibindings.Multibinder&lt;T&gt;"
4157 abstract="false" native="false" synchronized="false"
4158 static="true" final="false" visibility="public"
4159 deprecated="not deprecated">
4160 <param name="binder" type="com.google.inject.Binder"/>
4161 <param name="type" type="java.lang.Class&lt;T&gt;"/>
4162 <doc>
4163 <![CDATA[Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is
4164 itself bound with no binding annotation.]]>
4165 </doc>
4166 </method>
4167 <method name="newSetBinder" return="com.google.inject.multibindings.Multibinder&lt;T&gt;"
4168 abstract="false" native="false" synchronized="false"
4169 static="true" final="false" visibility="public"
4170 deprecated="not deprecated">
4171 <param name="binder" type="com.google.inject.Binder"/>
4172 <param name="type" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
4173 <param name="annotation" type="java.lang.annotation.Annotation"/>
4174 <doc>
4175 <![CDATA[Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is
4176 itself bound with {@code annotation}.]]>
4177 </doc>
4178 </method>
4179 <method name="newSetBinder" return="com.google.inject.multibindings.Multibinder&lt;T&gt;"
4180 abstract="false" native="false" synchronized="false"
4181 static="true" final="false" visibility="public"
4182 deprecated="not deprecated">
4183 <param name="binder" type="com.google.inject.Binder"/>
4184 <param name="type" type="java.lang.Class&lt;T&gt;"/>
4185 <param name="annotation" type="java.lang.annotation.Annotation"/>
4186 <doc>
4187 <![CDATA[Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is
4188 itself bound with {@code annotation}.]]>
4189 </doc>
4190 </method>
4191 <method name="newSetBinder" return="com.google.inject.multibindings.Multibinder&lt;T&gt;"
4192 abstract="false" native="false" synchronized="false"
4193 static="true" final="false" visibility="public"
4194 deprecated="not deprecated">
4195 <param name="binder" type="com.google.inject.Binder"/>
4196 <param name="type" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
4197 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
4198 <doc>
4199 <![CDATA[Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is
4200 itself bound with {@code annotationType}.]]>
4201 </doc>
4202 </method>
4203 <method name="newSetBinder" return="com.google.inject.multibindings.Multibinder&lt;T&gt;"
4204 abstract="false" native="false" synchronized="false"
4205 static="true" final="false" visibility="public"
4206 deprecated="not deprecated">
4207 <param name="binder" type="com.google.inject.Binder"/>
4208 <param name="type" type="java.lang.Class&lt;T&gt;"/>
4209 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
4210 <doc>
4211 <![CDATA[Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is
4212 itself bound with {@code annotationType}.]]>
4213 </doc>
4214 </method>
4215 <method name="permitDuplicates" return="com.google.inject.multibindings.Multibinder&lt;T&gt;"
4216 abstract="true" native="false" synchronized="false"
4217 static="false" final="false" visibility="public"
4218 deprecated="not deprecated">
4219 <doc>
4220 <![CDATA[Configures the bound set to silently discard duplicate elements. When multiple equal values are
4221 bound, the one that gets included is arbitrary. When multiple modules contribute elements to
4222 the set, this configuration option impacts all of them.
4223
4224 @return this multibinder
4225 @since 3.0]]>
4226 </doc>
4227 </method>
4228 <method name="addBinding" return="com.google.inject.binder.LinkedBindingBuilder&lt;T&gt;"
4229 abstract="true" native="false" synchronized="false"
4230 static="false" final="false" visibility="public"
4231 deprecated="not deprecated">
4232 <doc>
4233 <![CDATA[Returns a binding builder used to add a new element in the set. Each
4234 bound element must have a distinct value. Bound providers will be
4235 evaluated each time the set is injected.
4236
4237 <p>It is an error to call this method without also calling one of the
4238 {@code to} methods on the returned binding builder.
4239
4240 <p>Scoping elements independently is supported. Use the {@code in} method
4241 to specify a binding scope.]]>
4242 </doc>
4243 </method>
4244 <doc>
4245 <![CDATA[An API to bind multiple values separately, only to later inject them as a
4246 complete collection. Multibinder is intended for use in your application's
4247 module:
4248 <pre><code>
4249 public class SnacksModule extends AbstractModule {
4250 protected void configure() {
4251 Multibinder&lt;Snack&gt; multibinder
4252 = Multibinder.newSetBinder(binder(), Snack.class);
4253 multibinder.addBinding().toInstance(new Twix());
4254 multibinder.addBinding().toProvider(SnickersProvider.class);
4255 multibinder.addBinding().to(Skittles.class);
4256 }
4257 }</code></pre>
4258
4259 <p>With this binding, a {@link Set}{@code <Snack>} can now be injected:
4260 <pre><code>
4261 class SnackMachine {
4262 {@literal @}Inject
4263 public SnackMachine(Set&lt;Snack&gt; snacks) { ... }
4264 }</code></pre>
4265
4266 <p>Contributing multibindings from different modules is supported. For
4267 example, it is okay to have both {@code CandyModule} and {@code ChipsModule}
4268 to both create their own {@code Multibinder<Snack>}, and to each contribute
4269 bindings to the set of snacks. When that set is injected, it will contain
4270 elements from both modules.
4271
4272 <p>The set's iteration order is consistent with the binding order. This is
4273 convenient when multiple elements are contributed by the same module because
4274 that module can order its bindings appropriately. Avoid relying on the
4275 iteration order of elements contributed by different modules, since there is
4276 no equivalent mechanism to order modules.
4277
4278 <p>The set is unmodifiable. Elements can only be added to the set by
4279 configuring the multibinder. Elements can never be removed from the set.
4280
4281 <p>Elements are resolved at set injection time. If an element is bound to a
4282 provider, that provider's get method will be called each time the set is
4283 injected (unless the binding is also scoped).
4284
4285 <p>Annotations are be used to create different sets of the same element
4286 type. Each distinct annotation gets its own independent collection of
4287 elements.
4288
4289 <p><strong>Elements must be distinct.</strong> If multiple bound elements
4290 have the same value, set injection will fail.
4291
4292 <p><strong>Elements must be non-null.</strong> If any set element is null,
4293 set injection will fail.
4294
4295 @author jessewilson@google.com (Jesse Wilson)]]>
4296 </doc>
4297 </class>
4298 <!-- end class com.google.inject.multibindings.Multibinder -->
4299 <!-- start interface com.google.inject.multibindings.MultibinderBinding -->
4300 <interface name="MultibinderBinding" abstract="true"
4301 static="false" final="false" visibility="public"
4302 deprecated="not deprecated">
4303 <method name="getSetKey" return="com.google.inject.Key&lt;T&gt;"
4304 abstract="false" native="false" synchronized="false"
4305 static="false" final="false" visibility="public"
4306 deprecated="not deprecated">
4307 <doc>
4308 <![CDATA[Returns the key for the set.]]>
4309 </doc>
4310 </method>
4311 <method name="getElementTypeLiteral" return="com.google.inject.TypeLiteral&lt;?&gt;"
4312 abstract="false" native="false" synchronized="false"
4313 static="false" final="false" visibility="public"
4314 deprecated="not deprecated">
4315 <doc>
4316 <![CDATA[Returns the TypeLiteral that describes the type of elements in the set.
4317 <p>
4318 The elements will always match the type Set's generic type. For example, if getSetKey returns a
4319 key of <code>Set&lt;String></code>, then this will always return a
4320 <code>TypeLiteral&lt;String></code>.]]>
4321 </doc>
4322 </method>
4323 <method name="getElements" return="java.util.List&lt;com.google.inject.Binding&lt;?&gt;&gt;"
4324 abstract="false" native="false" synchronized="false"
4325 static="false" final="false" visibility="public"
4326 deprecated="not deprecated">
4327 <doc>
4328 <![CDATA[Returns all bindings that make up the set. This is only supported on bindings returned from an
4329 injector. This will throw {@link UnsupportedOperationException} if it is called on an element
4330 retrieved from {@link Elements#getElements}.
4331 <p>
4332 The elements will always match the type Set's generic type. For example, if getSetKey returns a
4333 key of <code>Set&lt;String></code>, then this will always return a list of type
4334 <code>List&lt;Binding&lt;String>></code>.]]>
4335 </doc>
4336 </method>
4337 <method name="permitsDuplicates" return="boolean"
4338 abstract="false" native="false" synchronized="false"
4339 static="false" final="false" visibility="public"
4340 deprecated="not deprecated">
4341 <doc>
4342 <![CDATA[Returns true if the multibinder permits duplicates. This is only supported on bindings returned
4343 from an injector. This will throw {@link UnsupportedOperationException} if it is called on a
4344 MultibinderBinding retrieved from {@link Elements#getElements}.]]>
4345 </doc>
4346 </method>
4347 <method name="containsElement" return="boolean"
4348 abstract="false" native="false" synchronized="false"
4349 static="false" final="false" visibility="public"
4350 deprecated="not deprecated">
4351 <param name="element" type="com.google.inject.spi.Element"/>
4352 <doc>
4353 <![CDATA[Returns true if this Multibinder uses the given Element. This will be true for bindings that
4354 derive the elements of the set and other bindings that Multibinder uses internally. This will
4355 work for MultibinderBindings retrieved from an injector and {@link Elements#getElements}.
4356 Usually this is only necessary if you are working with elements retrieved from modules (without
4357 an Injector), otherwise {@link #getElements} and {@link #permitsDuplicates} are better options.
4358 <p>
4359 If you need to introspect the details of the set, such as the values or if it permits
4360 duplicates, it is necessary to pass the elements through an Injector and use
4361 {@link #getElements()} and {@link #permitsDuplicates()}.]]>
4362 </doc>
4363 </method>
4364 <doc>
4365 <![CDATA[A binding for a Multibinder.
4366
4367 @param <T> The fully qualified type of the set, including Set. For example:
4368 <code>MultibinderBinding&lt;Set&lt;Boolean>></code>
4369
4370 @since 3.0
4371 @author sameb@google.com (Sam Berlin)]]>
4372 </doc>
4373 </interface>
4374 <!-- end interface com.google.inject.multibindings.MultibinderBinding -->
4375 <!-- start interface com.google.inject.multibindings.MultibindingsTargetVisitor -->
4376 <interface name="MultibindingsTargetVisitor" abstract="true"
4377 static="false" final="false" visibility="public"
4378 deprecated="not deprecated">
4379 <implements name="com.google.inject.spi.BindingTargetVisitor&lt;T, V&gt;"/>
4380 <method name="visit" return="V"
4381 abstract="false" native="false" synchronized="false"
4382 static="false" final="false" visibility="public"
4383 deprecated="not deprecated">
4384 <param name="multibinding" type="com.google.inject.multibindings.MultibinderBinding&lt;? extends T&gt;"/>
4385 <doc>
4386 <![CDATA[Visits a binding created through {@link Multibinder}.]]>
4387 </doc>
4388 </method>
4389 <method name="visit" return="V"
4390 abstract="false" native="false" synchronized="false"
4391 static="false" final="false" visibility="public"
4392 deprecated="not deprecated">
4393 <param name="mapbinding" type="com.google.inject.multibindings.MapBinderBinding&lt;? extends T&gt;"/>
4394 <doc>
4395 <![CDATA[Visits a binding created through {@link MapBinder}.]]>
4396 </doc>
4397 </method>
4398 <doc>
4399 <![CDATA[A visitor for the multibinder extension.
4400 <p>
4401 If your {@link BindingTargetVisitor} implements this interface, bindings created by using
4402 {@link Multibinder} or {@link MapBinder} will be visited through this interface.
4403
4404 @since 3.0
4405 @author sameb@google.com (Sam Berlin)]]>
4406 </doc>
4407 </interface>
4408 <!-- end interface com.google.inject.multibindings.MultibindingsTargetVisitor -->
4409</package>
4410<package name="com.google.inject.name">
4411 <!-- start class com.google.inject.name.Named -->
4412 <class name="Named" abstract="true"
4413 static="false" final="false" visibility="public"
4414 deprecated="not deprecated">
4415 <implements name="java.lang.annotation.Annotation"/>
4416 <doc>
4417 <![CDATA[Annotates named things.
4418
4419 @author crazybob@google.com (Bob Lee)]]>
4420 </doc>
4421 </class>
4422 <!-- end class com.google.inject.name.Named -->
4423 <!-- start class com.google.inject.name.Names -->
4424 <class name="Names" extends="java.lang.Object"
4425 abstract="false"
4426 static="false" final="false" visibility="public"
4427 deprecated="not deprecated">
4428 <method name="named" return="com.google.inject.name.Named"
4429 abstract="false" native="false" synchronized="false"
4430 static="true" final="false" visibility="public"
4431 deprecated="not deprecated">
4432 <param name="name" type="java.lang.String"/>
4433 <doc>
4434 <![CDATA[Creates a {@link Named} annotation with {@code name} as the value.]]>
4435 </doc>
4436 </method>
4437 <method name="bindProperties"
4438 abstract="false" native="false" synchronized="false"
4439 static="true" final="false" visibility="public"
4440 deprecated="not deprecated">
4441 <param name="binder" type="com.google.inject.Binder"/>
4442 <param name="properties" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;"/>
4443 <doc>
4444 <![CDATA[Creates a constant binding to {@code @Named(key)} for each entry in
4445 {@code properties}.]]>
4446 </doc>
4447 </method>
4448 <method name="bindProperties"
4449 abstract="false" native="false" synchronized="false"
4450 static="true" final="false" visibility="public"
4451 deprecated="not deprecated">
4452 <param name="binder" type="com.google.inject.Binder"/>
4453 <param name="properties" type="java.util.Properties"/>
4454 <doc>
4455 <![CDATA[Creates a constant binding to {@code @Named(key)} for each property. This
4456 method binds all properties including those inherited from
4457 {@link Properties#defaults defaults}.]]>
4458 </doc>
4459 </method>
4460 <doc>
4461 <![CDATA[Utility methods for use with {@code @}{@link Named}.
4462
4463 @author crazybob@google.com (Bob Lee)]]>
4464 </doc>
4465 </class>
4466 <!-- end class com.google.inject.name.Names -->
4467</package>
4468<package name="com.google.inject.persist">
4469 <!-- start class com.google.inject.persist.PersistFilter -->
4470 <class name="PersistFilter" extends="java.lang.Object"
4471 abstract="false"
4472 static="false" final="true" visibility="public"
4473 deprecated="not deprecated">
4474 <constructor name="PersistFilter" type="com.google.inject.persist.UnitOfWork, com.google.inject.persist.PersistService"
4475 static="false" final="false" visibility="public"
4476 deprecated="not deprecated">
4477 </constructor>
4478 <method name="init"
4479 abstract="false" native="false" synchronized="false"
4480 static="false" final="false" visibility="public"
4481 deprecated="not deprecated">
4482 <param name="filterConfig" type="FilterConfig"/>
4483 <exception name="ServletException" type="ServletException"/>
4484 </method>
4485 <method name="destroy"
4486 abstract="false" native="false" synchronized="false"
4487 static="false" final="false" visibility="public"
4488 deprecated="not deprecated">
4489 </method>
4490 <method name="doFilter"
4491 abstract="false" native="false" synchronized="false"
4492 static="false" final="false" visibility="public"
4493 deprecated="not deprecated">
4494 <param name="servletRequest" type="ServletRequest"/>
4495 <param name="servletResponse" type="ServletResponse"/>
4496 <param name="filterChain" type="FilterChain"/>
4497 <exception name="IOException" type="java.io.IOException"/>
4498 <exception name="ServletException" type="ServletException"/>
4499 </method>
4500 <doc>
4501 <![CDATA[Apply this filter to enable the HTTP Request unit of work and to have
4502 guice-persist manage the lifecycle of active units of work.
4503 The filter automatically starts and stops the relevant {@link PersistService}
4504 upon {@link javax.servlet.Filter#init(javax.servlet.FilterConfig)} and
4505 {@link javax.servlet.Filter#destroy()} respectively.
4506
4507 <p> To be able to use the open session-in-view pattern (i.e. work per request),
4508 register this filter <b>once</b> in your Guice {@code ServletModule}. It is
4509 important that you register this filter before any other filter.
4510
4511 For multiple providers, you should register this filter once per provider, inside
4512 a private module for each persist module installed (this must be the same private
4513 module where the specific persist module is itself installed).
4514
4515 <p>
4516 Example configuration:
4517 <pre>{@code
4518 public class MyModule extends ServletModule {
4519 public void configureServlets() {
4520 filter("/*").through(PersistFilter.class);
4521
4522 serve("/index.html").with(MyHtmlServlet.class);
4523 // Etc.
4524 }
4525 }
4526 }</pre>
4527 <p>
4528 This filter is thread safe and allows you to create injectors concurrently
4529 and deploy multiple guice-persist modules within the same injector, or even
4530 multiple injectors with persist modules withing the same JVM or web app.
4531 <p>
4532 This filter requires the Guice Servlet extension.
4533
4534 @author Dhanji R. Prasanna (dhanji@gmail.com)]]>
4535 </doc>
4536 </class>
4537 <!-- end class com.google.inject.persist.PersistFilter -->
4538 <!-- start class com.google.inject.persist.PersistModule -->
4539 <class name="PersistModule" extends="com.google.inject.AbstractModule"
4540 abstract="true"
4541 static="false" final="false" visibility="public"
4542 deprecated="not deprecated">
4543 <constructor name="PersistModule"
4544 static="false" final="false" visibility="public"
4545 deprecated="not deprecated">
4546 </constructor>
4547 <method name="configure"
4548 abstract="false" native="false" synchronized="false"
4549 static="false" final="true" visibility="protected"
4550 deprecated="not deprecated">
4551 </method>
4552 <method name="configurePersistence"
4553 abstract="true" native="false" synchronized="false"
4554 static="false" final="false" visibility="protected"
4555 deprecated="not deprecated">
4556 </method>
4557 <method name="getTransactionInterceptor" return="org.aopalliance.intercept.MethodInterceptor"
4558 abstract="true" native="false" synchronized="false"
4559 static="false" final="false" visibility="protected"
4560 deprecated="not deprecated">
4561 </method>
4562 <doc>
4563 <![CDATA[Install this module to add guice-persist library support for JPA persistence
4564 providers.
4565
4566 @author dhanji@gmail.com (Dhanji R. Prasanna)]]>
4567 </doc>
4568 </class>
4569 <!-- end class com.google.inject.persist.PersistModule -->
4570 <!-- start interface com.google.inject.persist.PersistService -->
4571 <interface name="PersistService" abstract="true"
4572 static="false" final="false" visibility="public"
4573 deprecated="not deprecated">
4574 <method name="start"
4575 abstract="false" native="false" synchronized="false"
4576 static="false" final="false" visibility="public"
4577 deprecated="not deprecated">
4578 <doc>
4579 <![CDATA[Starts the underlying persistence engine and makes guice-persist ready for
4580 use. For instance, with JPA, it creates an EntityManagerFactory and may
4581 open connection pools. This method must be called by your code prior to
4582 using any guice-persist or JPA artifacts. If already started,
4583 calling this method does nothing, if already stopped, it also does
4584 nothing.]]>
4585 </doc>
4586 </method>
4587 <method name="stop"
4588 abstract="false" native="false" synchronized="false"
4589 static="false" final="false" visibility="public"
4590 deprecated="not deprecated">
4591 <doc>
4592 <![CDATA[Stops the underlying persistence engine. For instance, with JPA, it
4593 closes the {@code EntityManagerFactory}. If already stopped, calling this
4594 method does nothing. If not yet started, it also does nothing.]]>
4595 </doc>
4596 </method>
4597 <doc>
4598 <![CDATA[Persistence provider service. Use this to manage the overall
4599 startup and stop of the persistence module(s).
4600
4601 TODO(dhanji): Integrate with Service API when appropriate.
4602
4603 @author dhanji@gmail.com (Dhanji R. Prasanna)]]>
4604 </doc>
4605 </interface>
4606 <!-- end interface com.google.inject.persist.PersistService -->
4607 <!-- start class com.google.inject.persist.Transactional -->
4608 <class name="Transactional" abstract="true"
4609 static="false" final="false" visibility="public"
4610 deprecated="not deprecated">
4611 <implements name="java.lang.annotation.Annotation"/>
4612 <doc>
4613 <![CDATA[<p> Any method or class marked with this annotation will be considered for transactionality.
4614 Consult the documentation on http://code.google.com/p/google-guice for detailed semantics.
4615 Marking a method {@code @Transactional} will start a new transaction before the method
4616 executes and commit it after the method returns.
4617 <p>
4618 If the method throws an exception, the transaction will be rolled back <em>unless</em>
4619 you have specifically requested not to in the {@link #ignore()} clause.
4620 <p>
4621 Similarly, the set of exceptions that will trigger a rollback can be defined in
4622 the {@link #rollbackOn()} clause. By default, only unchecked exceptions trigger a
4623 rollback.
4624
4625 @author Dhanji R. Prasanna (dhanji@gmail.com)]]>
4626 </doc>
4627 </class>
4628 <!-- end class com.google.inject.persist.Transactional -->
4629 <!-- start interface com.google.inject.persist.UnitOfWork -->
4630 <interface name="UnitOfWork" abstract="true"
4631 static="false" final="false" visibility="public"
4632 deprecated="not deprecated">
4633 <method name="begin"
4634 abstract="false" native="false" synchronized="false"
4635 static="false" final="false" visibility="public"
4636 deprecated="not deprecated">
4637 <doc>
4638 <![CDATA[Starts a Unit Of Work. Underneath, causes a session to the data layer to be opened. If there
4639 is already one open, the invocation will do nothing. In this way, you can define arbitrary
4640 units-of-work that nest within one another safely.
4641
4642 Transaction semantics are not affected.]]>
4643 </doc>
4644 </method>
4645 <method name="end"
4646 abstract="false" native="false" synchronized="false"
4647 static="false" final="false" visibility="public"
4648 deprecated="not deprecated">
4649 <doc>
4650 <![CDATA[Declares an end to the current Unit of Work. Underneath, causes any open session to the data
4651 layer to close. If there is no Unit of work open, then the call returns silently. You can
4652 safely invoke end() repeatedly.
4653 <p>
4654 Transaction semantics are not affected.]]>
4655 </doc>
4656 </method>
4657 <doc>
4658 <![CDATA[This interface is used to gain manual control over the unit of work. This is mostly to do
4659 work in non-request, non-transactional threads. Or where more fine-grained control over the unit
4660 of work is required. Starting and ending a unit of work directly corresponds to opening and
4661 closing a {@code Session}, {@code EntityManager} or {@code ObjectContainer} respectively.
4662 <p> The
4663 Unit of Work referred to by UnitOfWork will always be local to the calling thread. Be careful to
4664 end() in a finally block. Neither JPA, nor Hibernate supports threadsafe sessions (reasoning
4665 behind thread-locality of Unit of Work semantics).
4666
4667 <ul>
4668 <li>Using UnitOfWork with the PersistFilter inside a request is not recommended.</li>
4669 <li>Using UnitOfWork with session-per-txn strategy is not terribly clever either.</li>
4670 <li>Using UnitOfWork with session-per-request strategy but *outside* a request (i.e. in a
4671 background or bootstrap thread) is probably a good use case.</li>
4672 </ul>
4673
4674 @author Dhanji R. Prasanna (dhanji@gmail com)]]>
4675 </doc>
4676 </interface>
4677 <!-- end interface com.google.inject.persist.UnitOfWork -->
4678</package>
4679<package name="com.google.inject.persist.finder">
4680 <!-- start class com.google.inject.persist.finder.DynamicFinder -->
4681 <class name="DynamicFinder" extends="java.lang.Object"
4682 abstract="false"
4683 static="false" final="true" visibility="public"
4684 deprecated="not deprecated">
4685 <constructor name="DynamicFinder" type="java.lang.reflect.Method"
4686 static="false" final="false" visibility="public"
4687 deprecated="not deprecated">
4688 </constructor>
4689 <method name="from" return="com.google.inject.persist.finder.DynamicFinder"
4690 abstract="false" native="false" synchronized="false"
4691 static="true" final="false" visibility="public"
4692 deprecated="not deprecated">
4693 <param name="method" type="java.lang.reflect.Method"/>
4694 <doc>
4695 <![CDATA[Returns some metadata if the method is annotated {@code @Finder} or null.
4696
4697 @param method a method you want to test as a dynamic finder]]>
4698 </doc>
4699 </method>
4700 <method name="metadata" return="com.google.inject.persist.finder.Finder"
4701 abstract="false" native="false" synchronized="false"
4702 static="false" final="false" visibility="public"
4703 deprecated="not deprecated">
4704 </method>
4705 <doc>
4706 <![CDATA[Utility that helps you introspect dynamic finder methods.
4707
4708 @author dhanji@gmail.com (Dhanji R. Prasanna)]]>
4709 </doc>
4710 </class>
4711 <!-- end class com.google.inject.persist.finder.DynamicFinder -->
4712 <!-- start class com.google.inject.persist.finder.Finder -->
4713 <class name="Finder" abstract="true"
4714 static="false" final="false" visibility="public"
4715 deprecated="not deprecated">
4716 <implements name="java.lang.annotation.Annotation"/>
4717 <doc>
4718 <![CDATA[Marks a method stub as a dynamic finder. The method is intercepted and replaced with the
4719 specified JPAQL query. Provides result auto-boxing and automatic parameter binding.
4720
4721 @author Dhanji R. Prasanna (dhanji@gmail.com)]]>
4722 </doc>
4723 </class>
4724 <!-- end class com.google.inject.persist.finder.Finder -->
4725 <!-- start class com.google.inject.persist.finder.FirstResult -->
4726 <class name="FirstResult" abstract="true"
4727 static="false" final="false" visibility="public"
4728 deprecated="not deprecated">
4729 <implements name="java.lang.annotation.Annotation"/>
4730 <doc>
4731 <![CDATA[Annotate any dynamic finder method's integer argument with this to pass in
4732 the index of the first result in the result set you are interested in.
4733 Useful for paging result sets. Complemented by {@link MaxResults}.
4734
4735 @author Dhanji R. Prasanna (dhanji@gmail.com)]]>
4736 </doc>
4737 </class>
4738 <!-- end class com.google.inject.persist.finder.FirstResult -->
4739 <!-- start class com.google.inject.persist.finder.MaxResults -->
4740 <class name="MaxResults" abstract="true"
4741 static="false" final="false" visibility="public"
4742 deprecated="not deprecated">
4743 <implements name="java.lang.annotation.Annotation"/>
4744 <doc>
4745 <![CDATA[Annotate any dynamic finder method's integer argument with this to pass in
4746 the maximum size of returned result window. Usefule for paging result sets.
4747 Complement of {@link FirstResult}.
4748
4749 @author Dhanji R. Prasanna (dhanji@gmail.com)]]>
4750 </doc>
4751 </class>
4752 <!-- end class com.google.inject.persist.finder.MaxResults -->
4753</package>
4754<package name="com.google.inject.persist.jpa">
4755 <!-- start class com.google.inject.persist.jpa.JpaPersistModule -->
4756 <class name="JpaPersistModule" extends="com.google.inject.persist.PersistModule"
4757 abstract="false"
4758 static="false" final="true" visibility="public"
4759 deprecated="not deprecated">
4760 <constructor name="JpaPersistModule" type="java.lang.String"
4761 static="false" final="false" visibility="public"
4762 deprecated="not deprecated">
4763 </constructor>
4764 <method name="configurePersistence"
4765 abstract="false" native="false" synchronized="false"
4766 static="false" final="false" visibility="protected"
4767 deprecated="not deprecated">
4768 </method>
4769 <method name="getTransactionInterceptor" return="org.aopalliance.intercept.MethodInterceptor"
4770 abstract="false" native="false" synchronized="false"
4771 static="false" final="false" visibility="protected"
4772 deprecated="not deprecated">
4773 </method>
4774 <method name="properties" return="com.google.inject.persist.jpa.JpaPersistModule"
4775 abstract="false" native="false" synchronized="false"
4776 static="false" final="false" visibility="public"
4777 deprecated="not deprecated">
4778 <param name="properties" type="java.util.Properties"/>
4779 <doc>
4780 <![CDATA[Configures the JPA persistence provider with a set of properties.
4781
4782 @param properties A set of name value pairs that configure a JPA persistence
4783 provider as per the specification.]]>
4784 </doc>
4785 </method>
4786 <method name="addFinder" return="com.google.inject.persist.jpa.JpaPersistModule"
4787 abstract="false" native="false" synchronized="false"
4788 static="false" final="false" visibility="public"
4789 deprecated="not deprecated">
4790 <param name="iface" type="java.lang.Class&lt;T&gt;"/>
4791 <doc>
4792 <![CDATA[Adds an interface to this module to use as a dynamic finder.
4793
4794 @param iface Any interface type whose methods are all dynamic finders.]]>
4795 </doc>
4796 </method>
4797 <doc>
4798 <![CDATA[JPA provider for guice persist.
4799
4800 @author dhanji@gmail.com (Dhanji R. Prasanna)]]>
4801 </doc>
4802 </class>
4803 <!-- end class com.google.inject.persist.jpa.JpaPersistModule -->
4804</package>
4805<package name="com.google.inject.servlet">
4806 <!-- start class com.google.inject.servlet.GuiceFilter -->
4807 <class name="GuiceFilter" extends="java.lang.Object"
4808 abstract="false"
4809 static="false" final="false" visibility="public"
4810 deprecated="not deprecated">
4811 <constructor name="GuiceFilter"
4812 static="false" final="false" visibility="public"
4813 deprecated="not deprecated">
4814 </constructor>
4815 <method name="doFilter"
4816 abstract="false" native="false" synchronized="false"
4817 static="false" final="false" visibility="public"
4818 deprecated="not deprecated">
4819 <param name="servletRequest" type="ServletRequest"/>
4820 <param name="servletResponse" type="ServletResponse"/>
4821 <param name="filterChain" type="FilterChain"/>
4822 <exception name="IOException" type="java.io.IOException"/>
4823 <exception name="ServletException" type="ServletException"/>
4824 </method>
4825 <method name="init"
4826 abstract="false" native="false" synchronized="false"
4827 static="false" final="false" visibility="public"
4828 deprecated="not deprecated">
4829 <param name="filterConfig" type="FilterConfig"/>
4830 <exception name="ServletException" type="ServletException"/>
4831 </method>
4832 <method name="destroy"
4833 abstract="false" native="false" synchronized="false"
4834 static="false" final="false" visibility="public"
4835 deprecated="not deprecated">
4836 </method>
4837 <doc>
4838 <![CDATA[<p>
4839 Apply this filter in web.xml above all other filters (typically), to all requests where you plan
4840 to use servlet scopes. This is also needed in order to dispatch requests to injectable filters
4841 and servlets:
4842 <pre>
4843 &lt;filter&gt;
4844 &lt;filter-name&gt;guiceFilter&lt;/filter-name&gt;
4845 &lt;filter-class&gt;<b>com.google.inject.servlet.GuiceFilter</b>&lt;/filter-class&gt;
4846 &lt;/filter&gt;
4847
4848 &lt;filter-mapping&gt;
4849 &lt;filter-name&gt;guiceFilter&lt;/filter-name&gt;
4850 &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
4851 &lt;/filter-mapping&gt;
4852 </pre>
4853
4854 This filter must appear before every filter that makes use of Guice injection or servlet
4855 scopes functionality. Typically, you will only register this filter in web.xml and register
4856 any other filters (and servlets) using a {@link ServletModule}.
4857
4858 @author crazybob@google.com (Bob Lee)
4859 @author dhanji@gmail.com (Dhanji R. Prasanna)]]>
4860 </doc>
4861 </class>
4862 <!-- end class com.google.inject.servlet.GuiceFilter -->
4863 <!-- start class com.google.inject.servlet.GuiceServletContextListener -->
4864 <class name="GuiceServletContextListener" extends="java.lang.Object"
4865 abstract="true"
4866 static="false" final="false" visibility="public"
4867 deprecated="not deprecated">
4868 <constructor name="GuiceServletContextListener"
4869 static="false" final="false" visibility="public"
4870 deprecated="not deprecated">
4871 </constructor>
4872 <method name="contextInitialized"
4873 abstract="false" native="false" synchronized="false"
4874 static="false" final="false" visibility="public"
4875 deprecated="not deprecated">
4876 <param name="servletContextEvent" type="ServletContextEvent"/>
4877 </method>
4878 <method name="contextDestroyed"
4879 abstract="false" native="false" synchronized="false"
4880 static="false" final="false" visibility="public"
4881 deprecated="not deprecated">
4882 <param name="servletContextEvent" type="ServletContextEvent"/>
4883 </method>
4884 <method name="getInjector" return="com.google.inject.Injector"
4885 abstract="true" native="false" synchronized="false"
4886 static="false" final="false" visibility="protected"
4887 deprecated="not deprecated">
4888 <doc>
4889 <![CDATA[Override this method to create (or otherwise obtain a reference to) your
4890 injector.]]>
4891 </doc>
4892 </method>
4893 <doc>
4894 <![CDATA[As of Guice 2.0 you can still use (your subclasses of) {@code GuiceServletContextListener}
4895 class as a logical place to create and configure your injector. This will ensure the injector
4896 is created when the web application is deployed.
4897
4898 @author Kevin Bourrillion (kevinb@google.com)
4899 @since 2.0]]>
4900 </doc>
4901 </class>
4902 <!-- end class com.google.inject.servlet.GuiceServletContextListener -->
4903 <!-- start interface com.google.inject.servlet.InstanceFilterBinding -->
4904 <interface name="InstanceFilterBinding" abstract="true"
4905 static="false" final="false" visibility="public"
4906 deprecated="not deprecated">
4907 <method name="getUriPatternType" return="com.google.inject.servlet.UriPatternType"
4908 abstract="false" native="false" synchronized="false"
4909 static="false" final="false" visibility="public"
4910 deprecated="not deprecated">
4911 <doc>
4912 <![CDATA[Returns the pattern type that this filter binding was created with.
4913 This will be {@link UriPatternType#REGEX} if the binding was created with
4914 {@link ServletModule#filterRegex(String, String...)}, and
4915 {@link UriPatternType#SERVLET} if it was created with
4916 {@link ServletModule#filter(String, String...)}.]]>
4917 </doc>
4918 </method>
4919 <method name="getPattern" return="java.lang.String"
4920 abstract="false" native="false" synchronized="false"
4921 static="false" final="false" visibility="public"
4922 deprecated="not deprecated">
4923 <doc>
4924 <![CDATA[Returns the pattern used to match against the filter.]]>
4925 </doc>
4926 </method>
4927 <method name="getInitParams" return="java.util.Map&lt;java.lang.String, java.lang.String&gt;"
4928 abstract="false" native="false" synchronized="false"
4929 static="false" final="false" visibility="public"
4930 deprecated="not deprecated">
4931 <doc>
4932 <![CDATA[Returns any context params supplied when creating the binding.]]>
4933 </doc>
4934 </method>
4935 <method name="getFilterInstance" return="Filter"
4936 abstract="false" native="false" synchronized="false"
4937 static="false" final="false" visibility="public"
4938 deprecated="not deprecated">
4939 <doc>
4940 <![CDATA[Returns the filter instance that will be used.]]>
4941 </doc>
4942 </method>
4943 <doc>
4944 <![CDATA[A binding to a single instance of a filter.
4945
4946 @author sameb@google.com
4947 @since 3.0]]>
4948 </doc>
4949 </interface>
4950 <!-- end interface com.google.inject.servlet.InstanceFilterBinding -->
4951 <!-- start interface com.google.inject.servlet.InstanceServletBinding -->
4952 <interface name="InstanceServletBinding" abstract="true"
4953 static="false" final="false" visibility="public"
4954 deprecated="not deprecated">
4955 <method name="getUriPatternType" return="com.google.inject.servlet.UriPatternType"
4956 abstract="false" native="false" synchronized="false"
4957 static="false" final="false" visibility="public"
4958 deprecated="not deprecated">
4959 <doc>
4960 <![CDATA[Returns the pattern type that this servlet binding was created with.
4961 This will be {@link UriPatternType#REGEX} if the binding was created with
4962 {@link ServletModule#serveRegex(String, String...)}, and
4963 {@link UriPatternType#SERVLET} if it was created with
4964 {@link ServletModule#serve(String, String...)}.]]>
4965 </doc>
4966 </method>
4967 <method name="getPattern" return="java.lang.String"
4968 abstract="false" native="false" synchronized="false"
4969 static="false" final="false" visibility="public"
4970 deprecated="not deprecated">
4971 <doc>
4972 <![CDATA[Returns the pattern used to match against the servlet.]]>
4973 </doc>
4974 </method>
4975 <method name="getInitParams" return="java.util.Map&lt;java.lang.String, java.lang.String&gt;"
4976 abstract="false" native="false" synchronized="false"
4977 static="false" final="false" visibility="public"
4978 deprecated="not deprecated">
4979 <doc>
4980 <![CDATA[Returns any init params supplied when creating the binding.]]>
4981 </doc>
4982 </method>
4983 <method name="getServletInstance" return="HttpServlet"
4984 abstract="false" native="false" synchronized="false"
4985 static="false" final="false" visibility="public"
4986 deprecated="not deprecated">
4987 <doc>
4988 <![CDATA[Returns the servlet instance that will be used.]]>
4989 </doc>
4990 </method>
4991 <doc>
4992 <![CDATA[A binding to a single instance of a servlet.
4993
4994 @author sameb@google.com
4995 @since 3.0]]>
4996 </doc>
4997 </interface>
4998 <!-- end interface com.google.inject.servlet.InstanceServletBinding -->
4999 <!-- start interface com.google.inject.servlet.LinkedFilterBinding -->
5000 <interface name="LinkedFilterBinding" abstract="true"
5001 static="false" final="false" visibility="public"
5002 deprecated="not deprecated">
5003 <method name="getUriPatternType" return="com.google.inject.servlet.UriPatternType"
5004 abstract="false" native="false" synchronized="false"
5005 static="false" final="false" visibility="public"
5006 deprecated="not deprecated">
5007 <doc>
5008 <![CDATA[Returns the pattern type that this filter binding was created with.
5009 This will be {@link UriPatternType#REGEX} if the binding was created with
5010 {@link ServletModule#filterRegex(String, String...)}, and
5011 {@link UriPatternType#SERVLET} if it was created with
5012 {@link ServletModule#filter(String, String...)}.]]>
5013 </doc>
5014 </method>
5015 <method name="getPattern" return="java.lang.String"
5016 abstract="false" native="false" synchronized="false"
5017 static="false" final="false" visibility="public"
5018 deprecated="not deprecated">
5019 <doc>
5020 <![CDATA[Returns the pattern used to match against the filter.]]>
5021 </doc>
5022 </method>
5023 <method name="getInitParams" return="java.util.Map&lt;java.lang.String, java.lang.String&gt;"
5024 abstract="false" native="false" synchronized="false"
5025 static="false" final="false" visibility="public"
5026 deprecated="not deprecated">
5027 <doc>
5028 <![CDATA[Returns any init params supplied when creating the binding.]]>
5029 </doc>
5030 </method>
5031 <method name="getLinkedKey" return="com.google.inject.Key&lt;? extends Filter&gt;"
5032 abstract="false" native="false" synchronized="false"
5033 static="false" final="false" visibility="public"
5034 deprecated="not deprecated">
5035 <doc>
5036 <![CDATA[Returns the key used to lookup the filter instance.]]>
5037 </doc>
5038 </method>
5039 <doc>
5040 <![CDATA[A linked binding to a filter.
5041
5042 @author sameb@google.com
5043 @since 3.0]]>
5044 </doc>
5045 </interface>
5046 <!-- end interface com.google.inject.servlet.LinkedFilterBinding -->
5047 <!-- start interface com.google.inject.servlet.LinkedServletBinding -->
5048 <interface name="LinkedServletBinding" abstract="true"
5049 static="false" final="false" visibility="public"
5050 deprecated="not deprecated">
5051 <method name="getUriPatternType" return="com.google.inject.servlet.UriPatternType"
5052 abstract="false" native="false" synchronized="false"
5053 static="false" final="false" visibility="public"
5054 deprecated="not deprecated">
5055 <doc>
5056 <![CDATA[Returns the pattern type that this servlet binding was created with.
5057 This will be {@link UriPatternType#REGEX} if the binding was created with
5058 {@link ServletModule#serveRegex(String, String...)}, and
5059 {@link UriPatternType#SERVLET} if it was created with
5060 {@link ServletModule#serve(String, String...)}.]]>
5061 </doc>
5062 </method>
5063 <method name="getPattern" return="java.lang.String"
5064 abstract="false" native="false" synchronized="false"
5065 static="false" final="false" visibility="public"
5066 deprecated="not deprecated">
5067 <doc>
5068 <![CDATA[Returns the pattern used to match against the servlet.]]>
5069 </doc>
5070 </method>
5071 <method name="getInitParams" return="java.util.Map&lt;java.lang.String, java.lang.String&gt;"
5072 abstract="false" native="false" synchronized="false"
5073 static="false" final="false" visibility="public"
5074 deprecated="not deprecated">
5075 <doc>
5076 <![CDATA[Returns any init params supplied when creating the binding.]]>
5077 </doc>
5078 </method>
5079 <method name="getLinkedKey" return="com.google.inject.Key&lt;? extends HttpServlet&gt;"
5080 abstract="false" native="false" synchronized="false"
5081 static="false" final="false" visibility="public"
5082 deprecated="not deprecated">
5083 <doc>
5084 <![CDATA[Returns the key used to lookup the servlet instance.]]>
5085 </doc>
5086 </method>
5087 <doc>
5088 <![CDATA[A linked binding to a servlet.
5089
5090 @author sameb@google.com
5091 @since 3.0]]>
5092 </doc>
5093 </interface>
5094 <!-- end interface com.google.inject.servlet.LinkedServletBinding -->
5095 <!-- start class com.google.inject.servlet.RequestParameters -->
5096 <class name="RequestParameters" abstract="true"
5097 static="false" final="false" visibility="public"
5098 deprecated="not deprecated">
5099 <implements name="java.lang.annotation.Annotation"/>
5100 <doc>
5101 <![CDATA[Apply this to field or parameters of type {@code Map<String, String[]>}
5102 when you want the HTTP request parameter map to be injected.
5103
5104 @author crazybob@google.com (Bob Lee)]]>
5105 </doc>
5106 </class>
5107 <!-- end class com.google.inject.servlet.RequestParameters -->
5108 <!-- start class com.google.inject.servlet.RequestScoped -->
5109 <class name="RequestScoped" abstract="true"
5110 static="false" final="false" visibility="public"
5111 deprecated="not deprecated">
5112 <implements name="java.lang.annotation.Annotation"/>
5113 <doc>
5114 <![CDATA[Apply this to implementation classes when you want one instance per request.
5115
5116 @author crazybob@google.com (Bob Lee)]]>
5117 </doc>
5118 </class>
5119 <!-- end class com.google.inject.servlet.RequestScoped -->
5120 <!-- start class com.google.inject.servlet.ServletModule -->
5121 <class name="ServletModule" extends="com.google.inject.AbstractModule"
5122 abstract="false"
5123 static="false" final="false" visibility="public"
5124 deprecated="not deprecated">
5125 <constructor name="ServletModule"
5126 static="false" final="false" visibility="public"
5127 deprecated="not deprecated">
5128 </constructor>
5129 <method name="configure"
5130 abstract="false" native="false" synchronized="false"
5131 static="false" final="true" visibility="protected"
5132 deprecated="not deprecated">
5133 </method>
5134 <method name="configureServlets"
5135 abstract="false" native="false" synchronized="false"
5136 static="false" final="false" visibility="protected"
5137 deprecated="not deprecated">
5138 <doc>
5139 <![CDATA[<h3>Servlet Mapping EDSL</h3>
5140
5141 <p> Part of the EDSL builder language for configuring servlets
5142 and filters with guice-servlet. Think of this as an in-code replacement for web.xml.
5143 Filters and servlets are configured here using simple java method calls. Here is a typical
5144 example of registering a filter when creating your Guice injector:
5145
5146 <pre>
5147 Guice.createInjector(..., new ServletModule() {
5148
5149 {@literal @}Override
5150 protected void configureServlets() {
5151 <b>serve("*.html").with(MyServlet.class)</b>
5152 }
5153 }
5154 </pre>
5155
5156 This registers a servlet (subclass of {@code HttpServlet}) called {@code MyServlet} to service
5157 any web pages ending in {@code .html}. You can also use a path-style syntax to register
5158 servlets:
5159
5160 <pre>
5161 <b>serve("/my/*").with(MyServlet.class)</b>
5162 </pre>
5163
5164 Every servlet (or filter) is required to be a singleton. If you cannot annotate the class
5165 directly, you should add a separate {@code bind(..).in(Singleton.class)} rule elsewhere in
5166 your module. Mapping a servlet that is bound under any other scope is an error.
5167
5168 <p>
5169 <h4>Dispatch Order</h4>
5170 You are free to register as many servlets and filters as you like this way. They will
5171 be compared and dispatched in the order in which the filter methods are called:
5172
5173 <pre>
5174
5175 Guice.createInjector(..., new ServletModule() {
5176
5177 {@literal @}Override
5178 protected void configureServlets() {
5179 filter("/*").through(MyFilter.class);
5180 filter("*.css").through(MyCssFilter.class);
5181 filter("*.jpg").through(new MyJpgFilter());
5182 // etc..
5183
5184 serve("*.html").with(MyServlet.class);
5185 serve("/my/*").with(MyServlet.class);
5186 serve("*.jpg").with(new MyServlet());
5187 // etc..
5188 }
5189 }
5190 </pre>
5191 This will traverse down the list of rules in lexical order. For example, a url
5192 "{@code /my/file.js}" (after it runs through the matching filters) will first
5193 be compared against the servlet mapping:
5194
5195 <pre>
5196 serve("*.html").with(MyServlet.class);
5197 </pre>
5198 And failing that, it will descend to the next servlet mapping:
5199
5200 <pre>
5201 serve("/my/*").with(MyServlet.class);
5202 </pre>
5203
5204 Since this rule matches, Guice Servlet will dispatch to {@code MyServlet}. These
5205 two mapping rules can also be written in more compact form using varargs syntax:
5206
5207 <pre>
5208 serve(<b>"*.html", "/my/*"</b>).with(MyServlet.class);
5209 </pre>
5210
5211 This way you can map several URI patterns to the same servlet. A similar syntax is
5212 also available for filter mappings.
5213
5214 <p>
5215 <h4>Regular Expressions</h4>
5216 You can also map servlets (or filters) to URIs using regular expressions:
5217 <pre>
5218 <b>serveRegex("(.)*ajax(.)*").with(MyAjaxServlet.class)</b>
5219 </pre>
5220
5221 This will map any URI containing the text "ajax" in it to {@code MyAjaxServlet}. Such as:
5222 <ul>
5223 <li>http://www.google.com/ajax.html</li>
5224 <li>http://www.google.com/content/ajax/index</li>
5225 <li>http://www.google.com/it/is_totally_ajaxian</li>
5226 </ul>
5227
5228
5229 <h3>Initialization Parameters</h3>
5230
5231 Servlets (and filters) allow you to pass in init params
5232 using the {@code <init-param>} tag in web.xml. You can similarly pass in parameters to
5233 Servlets and filters registered in Guice-servlet using a {@link java.util.Map} of parameter
5234 name/value pairs. For example, to initialize {@code MyServlet} with two parameters
5235 ({@code name="Dhanji", site="google.com"}) you could write:
5236
5237 <pre>
5238 Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
5239 params.put("name", "Dhanji");
5240 params.put("site", "google.com");
5241
5242 ...
5243 serve("/*").with(MyServlet.class, <b>params</b>)
5244 </pre>
5245
5246 <p>
5247 <h3>Binding Keys</h3>
5248
5249 You can also bind keys rather than classes. This lets you hide
5250 implementations with package-local visbility and expose them using
5251 only a Guice module and an annotation:
5252
5253 <pre>
5254 ...
5255 filter("/*").through(<b>Key.get(Filter.class, Fave.class)</b>);
5256 </pre>
5257
5258 Where {@code Filter.class} refers to the Servlet API interface and {@code Fave.class} is a
5259 custom binding annotation. Elsewhere (in one of your own modules) you can bind this
5260 filter's implementation:
5261
5262 <pre>
5263 bind(Filter.class)<b>.annotatedWith(Fave.class)</b>.to(MyFilterImpl.class);
5264 </pre>
5265
5266 See {@link com.google.inject.Binder} for more information on binding syntax.
5267
5268 <p>
5269 <h3>Multiple Modules</h3>
5270
5271 It is sometimes useful to capture servlet and filter mappings from multiple different
5272 modules. This is essential if you want to package and offer drop-in Guice plugins that
5273 provide servlet functionality.
5274
5275 <p>
5276 Guice Servlet allows you to register several instances of {@code ServletModule} to your
5277 injector. The order in which these modules are installed determines the dispatch order
5278 of filters and the precedence order of servlets. For example, if you had two servlet modules,
5279 {@code RpcModule} and {@code WebServiceModule} and they each contained a filter that mapped
5280 to the same URI pattern, {@code "/*"}:
5281
5282 <p>
5283 In {@code RpcModule}:
5284 <pre>
5285 filter("/*").through(RpcFilter.class);
5286 </pre>
5287
5288 In {@code WebServiceModule}:
5289 <pre>
5290 filter("/*").through(WebServiceFilter.class);
5291 </pre>
5292
5293 Then the order in which these filters are dispatched is determined by the order in which
5294 the modules are installed:
5295
5296 <pre>
5297 <b>install(new WebServiceModule());</b>
5298 install(new RpcModule());
5299 </pre>
5300
5301 In the case shown above {@code WebServiceFilter} will run first.
5302
5303 @since 2.0]]>
5304 </doc>
5305 </method>
5306 <method name="filter" return="com.google.inject.servlet.ServletModule.FilterKeyBindingBuilder"
5307 abstract="false" native="false" synchronized="false"
5308 static="false" final="true" visibility="protected"
5309 deprecated="not deprecated">
5310 <param name="urlPattern" type="java.lang.String"/>
5311 <param name="morePatterns" type="java.lang.String[]"/>
5312 <doc>
5313 <![CDATA[@param urlPattern Any Servlet-style pattern. examples: /*, /html/*, *.html, etc.
5314 @since 2.0]]>
5315 </doc>
5316 </method>
5317 <method name="filterRegex" return="com.google.inject.servlet.ServletModule.FilterKeyBindingBuilder"
5318 abstract="false" native="false" synchronized="false"
5319 static="false" final="true" visibility="protected"
5320 deprecated="not deprecated">
5321 <param name="regex" type="java.lang.String"/>
5322 <param name="regexes" type="java.lang.String[]"/>
5323 <doc>
5324 <![CDATA[@param regex Any Java-style regular expression.
5325 @since 2.0]]>
5326 </doc>
5327 </method>
5328 <method name="serve" return="com.google.inject.servlet.ServletModule.ServletKeyBindingBuilder"
5329 abstract="false" native="false" synchronized="false"
5330 static="false" final="true" visibility="protected"
5331 deprecated="not deprecated">
5332 <param name="urlPattern" type="java.lang.String"/>
5333 <param name="morePatterns" type="java.lang.String[]"/>
5334 <doc>
5335 <![CDATA[@param urlPattern Any Servlet-style pattern. examples: /*, /html/*, *.html, etc.
5336 @since 2.0]]>
5337 </doc>
5338 </method>
5339 <method name="serveRegex" return="com.google.inject.servlet.ServletModule.ServletKeyBindingBuilder"
5340 abstract="false" native="false" synchronized="false"
5341 static="false" final="true" visibility="protected"
5342 deprecated="not deprecated">
5343 <param name="regex" type="java.lang.String"/>
5344 <param name="regexes" type="java.lang.String[]"/>
5345 <doc>
5346 <![CDATA[@param regex Any Java-style regular expression.
5347 @since 2.0]]>
5348 </doc>
5349 </method>
5350 <method name="getServletContext" return="ServletContext"
5351 abstract="false" native="false" synchronized="false"
5352 static="false" final="true" visibility="protected"
5353 deprecated="not deprecated">
5354 <doc>
5355 <![CDATA[This method only works if you are using the {@linkplain GuiceServletContextListener} to
5356 create your injector. Otherwise, it returns null.
5357 @return The current servlet context.
5358 @since 2.1]]>
5359 </doc>
5360 </method>
5361 <doc>
5362 <![CDATA[Configures the servlet scopes and creates bindings for the servlet API
5363 objects so you can inject the request, response, session, etc.
5364
5365 <p>
5366 You should subclass this module to register servlets and
5367 filters in the {@link #configureServlets()} method.
5368
5369 @author crazybob@google.com (Bob Lee)
5370 @author dhanji@gmail.com (Dhanji R. Prasanna)]]>
5371 </doc>
5372 </class>
5373 <!-- end class com.google.inject.servlet.ServletModule -->
5374 <!-- start interface com.google.inject.servlet.ServletModule.FilterKeyBindingBuilder -->
5375 <interface name="ServletModule.FilterKeyBindingBuilder" abstract="true"
5376 static="true" final="false" visibility="public"
5377 deprecated="not deprecated">
5378 <method name="through"
5379 abstract="false" native="false" synchronized="false"
5380 static="false" final="false" visibility="public"
5381 deprecated="not deprecated">
5382 <param name="filterKey" type="java.lang.Class&lt;? extends Filter&gt;"/>
5383 </method>
5384 <method name="through"
5385 abstract="false" native="false" synchronized="false"
5386 static="false" final="false" visibility="public"
5387 deprecated="not deprecated">
5388 <param name="filterKey" type="com.google.inject.Key&lt;? extends Filter&gt;"/>
5389 </method>
5390 <method name="through"
5391 abstract="false" native="false" synchronized="false"
5392 static="false" final="false" visibility="public"
5393 deprecated="not deprecated">
5394 <param name="filter" type="Filter"/>
5395 <doc>
5396 <![CDATA[@since 3.0]]>
5397 </doc>
5398 </method>
5399 <method name="through"
5400 abstract="false" native="false" synchronized="false"
5401 static="false" final="false" visibility="public"
5402 deprecated="not deprecated">
5403 <param name="filterKey" type="java.lang.Class&lt;? extends Filter&gt;"/>
5404 <param name="initParams" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;"/>
5405 </method>
5406 <method name="through"
5407 abstract="false" native="false" synchronized="false"
5408 static="false" final="false" visibility="public"
5409 deprecated="not deprecated">
5410 <param name="filterKey" type="com.google.inject.Key&lt;? extends Filter&gt;"/>
5411 <param name="initParams" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;"/>
5412 </method>
5413 <method name="through"
5414 abstract="false" native="false" synchronized="false"
5415 static="false" final="false" visibility="public"
5416 deprecated="not deprecated">
5417 <param name="filter" type="Filter"/>
5418 <param name="initParams" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;"/>
5419 <doc>
5420 <![CDATA[@since 3.0]]>
5421 </doc>
5422 </method>
5423 <doc>
5424 <![CDATA[See the EDSL examples at {@link ServletModule#configureServlets()}
5425
5426 @since 2.0]]>
5427 </doc>
5428 </interface>
5429 <!-- end interface com.google.inject.servlet.ServletModule.FilterKeyBindingBuilder -->
5430 <!-- start interface com.google.inject.servlet.ServletModule.ServletKeyBindingBuilder -->
5431 <interface name="ServletModule.ServletKeyBindingBuilder" abstract="true"
5432 static="true" final="false" visibility="public"
5433 deprecated="not deprecated">
5434 <method name="with"
5435 abstract="false" native="false" synchronized="false"
5436 static="false" final="false" visibility="public"
5437 deprecated="not deprecated">
5438 <param name="servletKey" type="java.lang.Class&lt;? extends HttpServlet&gt;"/>
5439 </method>
5440 <method name="with"
5441 abstract="false" native="false" synchronized="false"
5442 static="false" final="false" visibility="public"
5443 deprecated="not deprecated">
5444 <param name="servletKey" type="com.google.inject.Key&lt;? extends HttpServlet&gt;"/>
5445 </method>
5446 <method name="with"
5447 abstract="false" native="false" synchronized="false"
5448 static="false" final="false" visibility="public"
5449 deprecated="not deprecated">
5450 <param name="servlet" type="HttpServlet"/>
5451 <doc>
5452 <![CDATA[@since 3.0]]>
5453 </doc>
5454 </method>
5455 <method name="with"
5456 abstract="false" native="false" synchronized="false"
5457 static="false" final="false" visibility="public"
5458 deprecated="not deprecated">
5459 <param name="servletKey" type="java.lang.Class&lt;? extends HttpServlet&gt;"/>
5460 <param name="initParams" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;"/>
5461 </method>
5462 <method name="with"
5463 abstract="false" native="false" synchronized="false"
5464 static="false" final="false" visibility="public"
5465 deprecated="not deprecated">
5466 <param name="servletKey" type="com.google.inject.Key&lt;? extends HttpServlet&gt;"/>
5467 <param name="initParams" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;"/>
5468 </method>
5469 <method name="with"
5470 abstract="false" native="false" synchronized="false"
5471 static="false" final="false" visibility="public"
5472 deprecated="not deprecated">
5473 <param name="servlet" type="HttpServlet"/>
5474 <param name="initParams" type="java.util.Map&lt;java.lang.String, java.lang.String&gt;"/>
5475 <doc>
5476 <![CDATA[@since 3.0]]>
5477 </doc>
5478 </method>
5479 <doc>
5480 <![CDATA[See the EDSL examples at {@link ServletModule#configureServlets()}
5481
5482 @since 2.0]]>
5483 </doc>
5484 </interface>
5485 <!-- end interface com.google.inject.servlet.ServletModule.ServletKeyBindingBuilder -->
5486 <!-- start interface com.google.inject.servlet.ServletModuleTargetVisitor -->
5487 <interface name="ServletModuleTargetVisitor" abstract="true"
5488 static="false" final="false" visibility="public"
5489 deprecated="not deprecated">
5490 <implements name="com.google.inject.spi.BindingTargetVisitor&lt;T, V&gt;"/>
5491 <method name="visit" return="V"
5492 abstract="false" native="false" synchronized="false"
5493 static="false" final="false" visibility="public"
5494 deprecated="not deprecated">
5495 <param name="binding" type="com.google.inject.servlet.LinkedFilterBinding"/>
5496 <doc>
5497 <![CDATA[Visits a filter binding created by {@link ServletModule#filter}, where
5498 {@link FilterKeyBindingBuilder#through} is called with a Class or Key.
5499
5500 If multiple patterns were specified, this will be called multiple times.]]>
5501 </doc>
5502 </method>
5503 <method name="visit" return="V"
5504 abstract="false" native="false" synchronized="false"
5505 static="false" final="false" visibility="public"
5506 deprecated="not deprecated">
5507 <param name="binding" type="com.google.inject.servlet.InstanceFilterBinding"/>
5508 <doc>
5509 <![CDATA[Visits a filter binding created by {@link ServletModule#filter} where
5510 {@link FilterKeyBindingBuilder#through} is called with a {@link Filter}.
5511
5512 If multiple patterns were specified, this will be called multiple times.]]>
5513 </doc>
5514 </method>
5515 <method name="visit" return="V"
5516 abstract="false" native="false" synchronized="false"
5517 static="false" final="false" visibility="public"
5518 deprecated="not deprecated">
5519 <param name="binding" type="com.google.inject.servlet.LinkedServletBinding"/>
5520 <doc>
5521 <![CDATA[Visits a servlet binding created by {@link ServletModule#serve} where
5522 {@link ServletKeyBindingBuilder#with}, is called with a Class or Key.
5523
5524 If multiple patterns were specified, this will be called multiple times.]]>
5525 </doc>
5526 </method>
5527 <method name="visit" return="V"
5528 abstract="false" native="false" synchronized="false"
5529 static="false" final="false" visibility="public"
5530 deprecated="not deprecated">
5531 <param name="binding" type="com.google.inject.servlet.InstanceServletBinding"/>
5532 <doc>
5533 <![CDATA[Visits a servlet binding created by {@link ServletModule#serve} where
5534 {@link ServletKeyBindingBuilder#with}, is called with an {@link HttpServlet}.
5535
5536 If multiple patterns were specified, this will be called multiple times.]]>
5537 </doc>
5538 </method>
5539 <doc>
5540 <![CDATA[A visitor for the servlet extension.
5541
5542 If your {@link BindingTargetVisitor} implements this interface, bindings created by using
5543 {@link ServletModule} will be visited through this interface.
5544
5545 @since 3.0
5546 @author sameb@google.com (Sam Berlin)]]>
5547 </doc>
5548 </interface>
5549 <!-- end interface com.google.inject.servlet.ServletModuleTargetVisitor -->
5550 <!-- start class com.google.inject.servlet.ServletScopes -->
5551 <class name="ServletScopes" extends="java.lang.Object"
5552 abstract="false"
5553 static="false" final="false" visibility="public"
5554 deprecated="not deprecated">
5555 <method name="continueRequest" return="java.util.concurrent.Callable&lt;T&gt;"
5556 abstract="false" native="false" synchronized="false"
5557 static="true" final="false" visibility="public"
5558 deprecated="not deprecated">
5559 <param name="callable" type="java.util.concurrent.Callable&lt;T&gt;"/>
5560 <param name="seedMap" type="java.util.Map&lt;com.google.inject.Key&lt;?&gt;, java.lang.Object&gt;"/>
5561 <doc>
5562 <![CDATA[Wraps the given callable in a contextual callable that "continues" the
5563 HTTP request in another thread. This acts as a way of transporting
5564 request context data from the request processing thread to to worker
5565 threads.
5566 <p>
5567 There are some limitations:
5568 <ul>
5569 <li>Derived objects (i.e. anything marked @RequestScoped will not be
5570 transported.</li>
5571 <li>State changes to the HttpServletRequest after this method is called
5572 will not be seen in the continued thread.</li>
5573 <li>Only the HttpServletRequest, ServletContext and request parameter
5574 map are available in the continued thread. The response and session
5575 are not available.</li>
5576 </ul>
5577
5578 @param callable code to be executed in another thread, which depends on
5579 the request scope.
5580 @return a callable that will invoke the given callable, making the request
5581 context available to it.
5582 @throws OutOfScopeException if this method is called from a non-request
5583 thread, or if the request has completed.
5584
5585 @since 3.0]]>
5586 </doc>
5587 </method>
5588 <method name="scopeRequest" return="java.util.concurrent.Callable&lt;T&gt;"
5589 abstract="false" native="false" synchronized="false"
5590 static="true" final="false" visibility="public"
5591 deprecated="not deprecated">
5592 <param name="callable" type="java.util.concurrent.Callable&lt;T&gt;"/>
5593 <param name="seedMap" type="java.util.Map&lt;com.google.inject.Key&lt;?&gt;, java.lang.Object&gt;"/>
5594 <doc>
5595 <![CDATA[Scopes the given callable inside a request scope. This is not the same
5596 as the HTTP request scope, but is used if no HTTP request scope is in
5597 progress. In this way, keys can be scoped as @RequestScoped and exist
5598 in non-HTTP requests (for example: RPC requests) as well as in HTTP
5599 request threads.
5600
5601 @param callable code to be executed which depends on the request scope.
5602 Typically in another thread, but not necessarily so.
5603 @param seedMap the initial set of scoped instances for Guice to seed the
5604 request scope with.
5605 @return a callable that when called will run inside the a request scope
5606 that exposes the instances in the {@code seedMap} as scoped keys.
5607 @since 3.0]]>
5608 </doc>
5609 </method>
5610 <field name="REQUEST" type="com.google.inject.Scope"
5611 transient="false" volatile="false"
5612 static="true" final="true" visibility="public"
5613 deprecated="not deprecated">
5614 <doc>
5615 <![CDATA[HTTP servlet request scope.]]>
5616 </doc>
5617 </field>
5618 <field name="SESSION" type="com.google.inject.Scope"
5619 transient="false" volatile="false"
5620 static="true" final="true" visibility="public"
5621 deprecated="not deprecated">
5622 <doc>
5623 <![CDATA[HTTP session scope.]]>
5624 </doc>
5625 </field>
5626 <doc>
5627 <![CDATA[Servlet scopes.
5628
5629 @author crazybob@google.com (Bob Lee)]]>
5630 </doc>
5631 </class>
5632 <!-- end class com.google.inject.servlet.ServletScopes -->
5633 <!-- start class com.google.inject.servlet.SessionScoped -->
5634 <class name="SessionScoped" abstract="true"
5635 static="false" final="false" visibility="public"
5636 deprecated="not deprecated">
5637 <implements name="java.lang.annotation.Annotation"/>
5638 <doc>
5639 <![CDATA[Apply this to implementation classes when you want one instance per session.
5640
5641 @see com.google.inject.Scopes#SINGLETON
5642 @author crazybob@google.com (Bob Lee)]]>
5643 </doc>
5644 </class>
5645 <!-- end class com.google.inject.servlet.SessionScoped -->
5646 <!-- start class com.google.inject.servlet.Struts2Factory -->
5647 <class name="Struts2Factory" extends="ObjectFactory"
5648 abstract="false"
5649 static="false" final="false" visibility="public"
5650 deprecated="not deprecated">
5651 <constructor name="Struts2Factory"
5652 static="false" final="false" visibility="public"
5653 deprecated="not deprecated">
5654 </constructor>
5655 <method name="isNoArgConstructorRequired" return="boolean"
5656 abstract="false" native="false" synchronized="false"
5657 static="false" final="false" visibility="public"
5658 deprecated="not deprecated">
5659 </method>
5660 <method name="getClassInstance" return="java.lang.Class"
5661 abstract="false" native="false" synchronized="false"
5662 static="false" final="false" visibility="public"
5663 deprecated="not deprecated">
5664 <param name="name" type="java.lang.String"/>
5665 <exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException"/>
5666 </method>
5667 <method name="buildBean" return="java.lang.Object"
5668 abstract="false" native="false" synchronized="false"
5669 static="false" final="false" visibility="public"
5670 deprecated="not deprecated">
5671 <param name="clazz" type="java.lang.Class"/>
5672 <param name="extraContext" type="java.util.Map"/>
5673 </method>
5674 <method name="buildInterceptor" return="Interceptor"
5675 abstract="false" native="false" synchronized="false"
5676 static="false" final="false" visibility="public"
5677 deprecated="not deprecated">
5678 <param name="interceptorConfig" type="InterceptorConfig"/>
5679 <param name="interceptorRefParams" type="java.util.Map"/>
5680 <exception name="ConfigurationException" type="ConfigurationException"/>
5681 </method>
5682 <doc>
5683 <![CDATA[Cleanup up version from Bob's GuiceObjectFactory. Now works properly with
5684 GS2 and fixes several bugs.
5685
5686 @author dhanji@gmail.com]]>
5687 </doc>
5688 </class>
5689 <!-- end class com.google.inject.servlet.Struts2Factory -->
5690 <!-- start class com.google.inject.servlet.UriPatternType -->
5691 <class name="UriPatternType" extends="java.lang.Enum&lt;com.google.inject.servlet.UriPatternType&gt;"
5692 abstract="false"
5693 static="false" final="true" visibility="public"
5694 deprecated="not deprecated">
5695 <method name="values" return="com.google.inject.servlet.UriPatternType[]"
5696 abstract="false" native="false" synchronized="false"
5697 static="true" final="false" visibility="public"
5698 deprecated="not deprecated">
5699 </method>
5700 <method name="valueOf" return="com.google.inject.servlet.UriPatternType"
5701 abstract="false" native="false" synchronized="false"
5702 static="true" final="false" visibility="public"
5703 deprecated="not deprecated">
5704 <param name="name" type="java.lang.String"/>
5705 </method>
5706 <doc>
5707 <![CDATA[An enumeration of the available URI-pattern matching styles
5708
5709 @since 3.0]]>
5710 </doc>
5711 </class>
5712 <!-- end class com.google.inject.servlet.UriPatternType -->
5713</package>
5714<package name="com.google.inject.spi">
5715 <!-- start interface com.google.inject.spi.BindingScopingVisitor -->
5716 <interface name="BindingScopingVisitor" abstract="true"
5717 static="false" final="false" visibility="public"
5718 deprecated="not deprecated">
5719 <method name="visitEagerSingleton" return="V"
5720 abstract="false" native="false" synchronized="false"
5721 static="false" final="false" visibility="public"
5722 deprecated="not deprecated">
5723 <doc>
5724 <![CDATA[Visit an eager singleton or single instance. This scope strategy is found on both module and
5725 injector bindings.]]>
5726 </doc>
5727 </method>
5728 <method name="visitScope" return="V"
5729 abstract="false" native="false" synchronized="false"
5730 static="false" final="false" visibility="public"
5731 deprecated="not deprecated">
5732 <param name="scope" type="com.google.inject.Scope"/>
5733 <doc>
5734 <![CDATA[Visit a scope instance. This scope strategy is found on both module and injector bindings.]]>
5735 </doc>
5736 </method>
5737 <method name="visitScopeAnnotation" return="V"
5738 abstract="false" native="false" synchronized="false"
5739 static="false" final="false" visibility="public"
5740 deprecated="not deprecated">
5741 <param name="scopeAnnotation" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
5742 <doc>
5743 <![CDATA[Visit a scope annotation. This scope strategy is found only on module bindings. The instance
5744 that implements this scope is registered by {@link com.google.inject.Binder#bindScope(Class,
5745 Scope) Binder.bindScope()}.]]>
5746 </doc>
5747 </method>
5748 <method name="visitNoScoping" return="V"
5749 abstract="false" native="false" synchronized="false"
5750 static="false" final="false" visibility="public"
5751 deprecated="not deprecated">
5752 <doc>
5753 <![CDATA[Visit an unspecified or unscoped strategy. On a module, this strategy indicates that the
5754 injector should use scoping annotations to find a scope. On an injector, it indicates that
5755 no scope is applied to the binding. An unscoped binding will behave like a scoped one when it
5756 is linked to a scoped binding.]]>
5757 </doc>
5758 </method>
5759 <doc>
5760 <![CDATA[Visits each of the strategies used to scope an injection.
5761
5762 @param <V> any type to be returned by the visit method. Use {@link Void} with
5763 {@code return null} if no return type is needed.
5764 @since 2.0]]>
5765 </doc>
5766 </interface>
5767 <!-- end interface com.google.inject.spi.BindingScopingVisitor -->
5768 <!-- start interface com.google.inject.spi.BindingTargetVisitor -->
5769 <interface name="BindingTargetVisitor" abstract="true"
5770 static="false" final="false" visibility="public"
5771 deprecated="not deprecated">
5772 <method name="visit" return="V"
5773 abstract="false" native="false" synchronized="false"
5774 static="false" final="false" visibility="public"
5775 deprecated="not deprecated">
5776 <param name="binding" type="com.google.inject.spi.InstanceBinding&lt;? extends T&gt;"/>
5777 <doc>
5778 <![CDATA[Visit a instance binding. The same instance is returned for every injection. This target is
5779 found in both module and injector bindings.]]>
5780 </doc>
5781 </method>
5782 <method name="visit" return="V"
5783 abstract="false" native="false" synchronized="false"
5784 static="false" final="false" visibility="public"
5785 deprecated="not deprecated">
5786 <param name="binding" type="com.google.inject.spi.ProviderInstanceBinding&lt;? extends T&gt;"/>
5787 <doc>
5788 <![CDATA[Visit a provider instance binding. The provider's {@code get} method is invoked to resolve
5789 injections. This target is found in both module and injector bindings.]]>
5790 </doc>
5791 </method>
5792 <method name="visit" return="V"
5793 abstract="false" native="false" synchronized="false"
5794 static="false" final="false" visibility="public"
5795 deprecated="not deprecated">
5796 <param name="binding" type="com.google.inject.spi.ProviderKeyBinding&lt;? extends T&gt;"/>
5797 <doc>
5798 <![CDATA[Visit a provider key binding. To resolve injections, the provider key is first resolved, then
5799 that provider's {@code get} method is invoked. This target is found in both module and injector
5800 bindings.]]>
5801 </doc>
5802 </method>
5803 <method name="visit" return="V"
5804 abstract="false" native="false" synchronized="false"
5805 static="false" final="false" visibility="public"
5806 deprecated="not deprecated">
5807 <param name="binding" type="com.google.inject.spi.LinkedKeyBinding&lt;? extends T&gt;"/>
5808 <doc>
5809 <![CDATA[Visit a linked key binding. The other key's binding is used to resolve injections. This
5810 target is found in both module and injector bindings.]]>
5811 </doc>
5812 </method>
5813 <method name="visit" return="V"
5814 abstract="false" native="false" synchronized="false"
5815 static="false" final="false" visibility="public"
5816 deprecated="not deprecated">
5817 <param name="binding" type="com.google.inject.spi.ExposedBinding&lt;? extends T&gt;"/>
5818 <doc>
5819 <![CDATA[Visit a binding to a key exposed from an enclosed private environment. This target is only
5820 found in injector bindings.]]>
5821 </doc>
5822 </method>
5823 <method name="visit" return="V"
5824 abstract="false" native="false" synchronized="false"
5825 static="false" final="false" visibility="public"
5826 deprecated="not deprecated">
5827 <param name="binding" type="com.google.inject.spi.UntargettedBinding&lt;? extends T&gt;"/>
5828 <doc>
5829 <![CDATA[Visit an untargetted binding. This target is found only on module bindings. It indicates
5830 that the injector should use its implicit binding strategies to resolve injections.]]>
5831 </doc>
5832 </method>
5833 <method name="visit" return="V"
5834 abstract="false" native="false" synchronized="false"
5835 static="false" final="false" visibility="public"
5836 deprecated="not deprecated">
5837 <param name="binding" type="com.google.inject.spi.ConstructorBinding&lt;? extends T&gt;"/>
5838 <doc>
5839 <![CDATA[Visit a constructor binding. To resolve injections, an instance is instantiated by invoking
5840 {@code constructor}. This target is found only on injector bindings.]]>
5841 </doc>
5842 </method>
5843 <method name="visit" return="V"
5844 abstract="false" native="false" synchronized="false"
5845 static="false" final="false" visibility="public"
5846 deprecated="not deprecated">
5847 <param name="binding" type="com.google.inject.spi.ConvertedConstantBinding&lt;? extends T&gt;"/>
5848 <doc>
5849 <![CDATA[Visit a binding created from converting a bound instance to a new type. The source binding
5850 has the same binding annotation but a different type. This target is found only on injector
5851 bindings.]]>
5852 </doc>
5853 </method>
5854 <method name="visit" return="V"
5855 abstract="false" native="false" synchronized="false"
5856 static="false" final="false" visibility="public"
5857 deprecated="not deprecated">
5858 <param name="binding" type="com.google.inject.spi.ProviderBinding&lt;? extends T&gt;"/>
5859 <doc>
5860 <![CDATA[Visit a binding to a {@link com.google.inject.Provider} that delegates to the binding for the
5861 provided type. This target is found only on injector bindings.]]>
5862 </doc>
5863 </method>
5864 <doc>
5865 <![CDATA[Visits each of the strategies used to find an instance to satisfy an injection.
5866
5867 @param <V> any type to be returned by the visit method. Use {@link Void} with
5868 {@code return null} if no return type is needed.
5869 @since 2.0]]>
5870 </doc>
5871 </interface>
5872 <!-- end interface com.google.inject.spi.BindingTargetVisitor -->
5873 <!-- start interface com.google.inject.spi.ConstructorBinding -->
5874 <interface name="ConstructorBinding" abstract="true"
5875 static="false" final="false" visibility="public"
5876 deprecated="not deprecated">
5877 <implements name="com.google.inject.Binding&lt;T&gt;"/>
5878 <implements name="com.google.inject.spi.HasDependencies"/>
5879 <method name="getConstructor" return="com.google.inject.spi.InjectionPoint"
5880 abstract="false" native="false" synchronized="false"
5881 static="false" final="false" visibility="public"
5882 deprecated="not deprecated">
5883 <doc>
5884 <![CDATA[Gets the constructor this binding injects.]]>
5885 </doc>
5886 </method>
5887 <method name="getInjectableMembers" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
5888 abstract="false" native="false" synchronized="false"
5889 static="false" final="false" visibility="public"
5890 deprecated="not deprecated">
5891 <doc>
5892 <![CDATA[Returns all instance method and field injection points on {@code type}.
5893
5894 @return a possibly empty set of injection points. The set has a specified iteration order. All
5895 fields are returned and then all methods. Within the fields, supertype fields are returned
5896 before subtype fields. Similarly, supertype methods are returned before subtype methods.]]>
5897 </doc>
5898 </method>
5899 <method name="getMethodInterceptors" return="java.util.Map&lt;java.lang.reflect.Method, java.util.List&lt;org.aopalliance.intercept.MethodInterceptor&gt;&gt;"
5900 abstract="false" native="false" synchronized="false"
5901 static="false" final="false" visibility="public"
5902 deprecated="not deprecated">
5903 <doc>
5904 <![CDATA[Returns the interceptors applied to each method, in the order that they will be applied.
5905
5906 @return a possibly empty map]]>
5907 </doc>
5908 </method>
5909 <doc>
5910 <![CDATA[A binding to the constructor of a concrete clss. To resolve injections, an instance is
5911 instantiated by invoking the constructor.
5912
5913 @author jessewilson@google.com (Jesse Wilson)
5914 @since 2.0]]>
5915 </doc>
5916 </interface>
5917 <!-- end interface com.google.inject.spi.ConstructorBinding -->
5918 <!-- start interface com.google.inject.spi.ConvertedConstantBinding -->
5919 <interface name="ConvertedConstantBinding" abstract="true"
5920 static="false" final="false" visibility="public"
5921 deprecated="not deprecated">
5922 <implements name="com.google.inject.Binding&lt;T&gt;"/>
5923 <implements name="com.google.inject.spi.HasDependencies"/>
5924 <method name="getValue" return="T"
5925 abstract="false" native="false" synchronized="false"
5926 static="false" final="false" visibility="public"
5927 deprecated="not deprecated">
5928 <doc>
5929 <![CDATA[Returns the converted value.]]>
5930 </doc>
5931 </method>
5932 <method name="getSourceKey" return="com.google.inject.Key&lt;java.lang.String&gt;"
5933 abstract="false" native="false" synchronized="false"
5934 static="false" final="false" visibility="public"
5935 deprecated="not deprecated">
5936 <doc>
5937 <![CDATA[Returns the key for the source binding. That binding can e retrieved from an injector using
5938 {@link com.google.inject.Injector#getBinding(Key) Injector.getBinding(key)}.]]>
5939 </doc>
5940 </method>
5941 <method name="getDependencies" return="java.util.Set&lt;com.google.inject.spi.Dependency&lt;?&gt;&gt;"
5942 abstract="false" native="false" synchronized="false"
5943 static="false" final="false" visibility="public"
5944 deprecated="not deprecated">
5945 <doc>
5946 <![CDATA[Returns a singleton set containing only the converted key.]]>
5947 </doc>
5948 </method>
5949 <doc>
5950 <![CDATA[A binding created from converting a bound instance to a new type. The source binding has the same
5951 binding annotation but a different type.
5952
5953 @author jessewilson@google.com (Jesse Wilson)
5954 @since 2.0]]>
5955 </doc>
5956 </interface>
5957 <!-- end interface com.google.inject.spi.ConvertedConstantBinding -->
5958 <!-- start class com.google.inject.spi.DefaultBindingScopingVisitor -->
5959 <class name="DefaultBindingScopingVisitor" extends="java.lang.Object"
5960 abstract="false"
5961 static="false" final="false" visibility="public"
5962 deprecated="not deprecated">
5963 <implements name="com.google.inject.spi.BindingScopingVisitor&lt;V&gt;"/>
5964 <constructor name="DefaultBindingScopingVisitor"
5965 static="false" final="false" visibility="public"
5966 deprecated="not deprecated">
5967 </constructor>
5968 <method name="visitOther" return="V"
5969 abstract="false" native="false" synchronized="false"
5970 static="false" final="false" visibility="protected"
5971 deprecated="not deprecated">
5972 <doc>
5973 <![CDATA[Default visit implementation. Returns {@code null}.]]>
5974 </doc>
5975 </method>
5976 <method name="visitEagerSingleton" return="V"
5977 abstract="false" native="false" synchronized="false"
5978 static="false" final="false" visibility="public"
5979 deprecated="not deprecated">
5980 </method>
5981 <method name="visitScope" return="V"
5982 abstract="false" native="false" synchronized="false"
5983 static="false" final="false" visibility="public"
5984 deprecated="not deprecated">
5985 <param name="scope" type="com.google.inject.Scope"/>
5986 </method>
5987 <method name="visitScopeAnnotation" return="V"
5988 abstract="false" native="false" synchronized="false"
5989 static="false" final="false" visibility="public"
5990 deprecated="not deprecated">
5991 <param name="scopeAnnotation" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
5992 </method>
5993 <method name="visitNoScoping" return="V"
5994 abstract="false" native="false" synchronized="false"
5995 static="false" final="false" visibility="public"
5996 deprecated="not deprecated">
5997 </method>
5998 <doc>
5999 <![CDATA[No-op visitor for subclassing. All interface methods simply delegate to
6000 {@link #visitOther()}, returning its result.
6001
6002 @param <V> any type to be returned by the visit method. Use {@link Void} with
6003 {@code return null} if no return type is needed.
6004
6005 @author jessewilson@google.com (Jesse Wilson)
6006 @since 2.0]]>
6007 </doc>
6008 </class>
6009 <!-- end class com.google.inject.spi.DefaultBindingScopingVisitor -->
6010 <!-- start class com.google.inject.spi.DefaultBindingTargetVisitor -->
6011 <class name="DefaultBindingTargetVisitor" extends="java.lang.Object"
6012 abstract="true"
6013 static="false" final="false" visibility="public"
6014 deprecated="not deprecated">
6015 <implements name="com.google.inject.spi.BindingTargetVisitor&lt;T, V&gt;"/>
6016 <constructor name="DefaultBindingTargetVisitor"
6017 static="false" final="false" visibility="public"
6018 deprecated="not deprecated">
6019 </constructor>
6020 <method name="visitOther" return="V"
6021 abstract="false" native="false" synchronized="false"
6022 static="false" final="false" visibility="protected"
6023 deprecated="not deprecated">
6024 <param name="binding" type="com.google.inject.Binding&lt;? extends T&gt;"/>
6025 <doc>
6026 <![CDATA[Default visit implementation. Returns {@code null}.]]>
6027 </doc>
6028 </method>
6029 <method name="visit" return="V"
6030 abstract="false" native="false" synchronized="false"
6031 static="false" final="false" visibility="public"
6032 deprecated="not deprecated">
6033 <param name="instanceBinding" type="com.google.inject.spi.InstanceBinding&lt;? extends T&gt;"/>
6034 </method>
6035 <method name="visit" return="V"
6036 abstract="false" native="false" synchronized="false"
6037 static="false" final="false" visibility="public"
6038 deprecated="not deprecated">
6039 <param name="providerInstanceBinding" type="com.google.inject.spi.ProviderInstanceBinding&lt;? extends T&gt;"/>
6040 </method>
6041 <method name="visit" return="V"
6042 abstract="false" native="false" synchronized="false"
6043 static="false" final="false" visibility="public"
6044 deprecated="not deprecated">
6045 <param name="providerKeyBinding" type="com.google.inject.spi.ProviderKeyBinding&lt;? extends T&gt;"/>
6046 </method>
6047 <method name="visit" return="V"
6048 abstract="false" native="false" synchronized="false"
6049 static="false" final="false" visibility="public"
6050 deprecated="not deprecated">
6051 <param name="linkedKeyBinding" type="com.google.inject.spi.LinkedKeyBinding&lt;? extends T&gt;"/>
6052 </method>
6053 <method name="visit" return="V"
6054 abstract="false" native="false" synchronized="false"
6055 static="false" final="false" visibility="public"
6056 deprecated="not deprecated">
6057 <param name="exposedBinding" type="com.google.inject.spi.ExposedBinding&lt;? extends T&gt;"/>
6058 </method>
6059 <method name="visit" return="V"
6060 abstract="false" native="false" synchronized="false"
6061 static="false" final="false" visibility="public"
6062 deprecated="not deprecated">
6063 <param name="untargettedBinding" type="com.google.inject.spi.UntargettedBinding&lt;? extends T&gt;"/>
6064 </method>
6065 <method name="visit" return="V"
6066 abstract="false" native="false" synchronized="false"
6067 static="false" final="false" visibility="public"
6068 deprecated="not deprecated">
6069 <param name="constructorBinding" type="com.google.inject.spi.ConstructorBinding&lt;? extends T&gt;"/>
6070 </method>
6071 <method name="visit" return="V"
6072 abstract="false" native="false" synchronized="false"
6073 static="false" final="false" visibility="public"
6074 deprecated="not deprecated">
6075 <param name="convertedConstantBinding" type="com.google.inject.spi.ConvertedConstantBinding&lt;? extends T&gt;"/>
6076 </method>
6077 <method name="visit" return="V"
6078 abstract="false" native="false" synchronized="false"
6079 static="false" final="false" visibility="public"
6080 deprecated="not deprecated">
6081 <param name="providerBinding" type="com.google.inject.spi.ProviderBinding&lt;? extends T&gt;"/>
6082 </method>
6083 <doc>
6084 <![CDATA[No-op visitor for subclassing. All interface methods simply delegate to {@link
6085 #visitOther(Binding)}, returning its result.
6086
6087 @param <V> any type to be returned by the visit method. Use {@link Void} with
6088 {@code return null} if no return type is needed.
6089
6090 @author jessewilson@google.com (Jesse Wilson)
6091 @since 2.0]]>
6092 </doc>
6093 </class>
6094 <!-- end class com.google.inject.spi.DefaultBindingTargetVisitor -->
6095 <!-- start class com.google.inject.spi.DefaultElementVisitor -->
6096 <class name="DefaultElementVisitor" extends="java.lang.Object"
6097 abstract="true"
6098 static="false" final="false" visibility="public"
6099 deprecated="not deprecated">
6100 <implements name="com.google.inject.spi.ElementVisitor&lt;V&gt;"/>
6101 <constructor name="DefaultElementVisitor"
6102 static="false" final="false" visibility="public"
6103 deprecated="not deprecated">
6104 </constructor>
6105 <method name="visitOther" return="V"
6106 abstract="false" native="false" synchronized="false"
6107 static="false" final="false" visibility="protected"
6108 deprecated="not deprecated">
6109 <param name="element" type="com.google.inject.spi.Element"/>
6110 <doc>
6111 <![CDATA[Default visit implementation. Returns {@code null}.]]>
6112 </doc>
6113 </method>
6114 <method name="visit" return="V"
6115 abstract="false" native="false" synchronized="false"
6116 static="false" final="false" visibility="public"
6117 deprecated="not deprecated">
6118 <param name="message" type="com.google.inject.spi.Message"/>
6119 </method>
6120 <method name="visit" return="V"
6121 abstract="false" native="false" synchronized="false"
6122 static="false" final="false" visibility="public"
6123 deprecated="not deprecated">
6124 <param name="binding" type="com.google.inject.Binding&lt;T&gt;"/>
6125 </method>
6126 <method name="visit" return="V"
6127 abstract="false" native="false" synchronized="false"
6128 static="false" final="false" visibility="public"
6129 deprecated="not deprecated">
6130 <param name="interceptorBinding" type="com.google.inject.spi.InterceptorBinding"/>
6131 </method>
6132 <method name="visit" return="V"
6133 abstract="false" native="false" synchronized="false"
6134 static="false" final="false" visibility="public"
6135 deprecated="not deprecated">
6136 <param name="scopeBinding" type="com.google.inject.spi.ScopeBinding"/>
6137 </method>
6138 <method name="visit" return="V"
6139 abstract="false" native="false" synchronized="false"
6140 static="false" final="false" visibility="public"
6141 deprecated="not deprecated">
6142 <param name="typeConverterBinding" type="com.google.inject.spi.TypeConverterBinding"/>
6143 </method>
6144 <method name="visit" return="V"
6145 abstract="false" native="false" synchronized="false"
6146 static="false" final="false" visibility="public"
6147 deprecated="not deprecated">
6148 <param name="providerLookup" type="com.google.inject.spi.ProviderLookup&lt;T&gt;"/>
6149 </method>
6150 <method name="visit" return="V"
6151 abstract="false" native="false" synchronized="false"
6152 static="false" final="false" visibility="public"
6153 deprecated="not deprecated">
6154 <param name="injectionRequest" type="com.google.inject.spi.InjectionRequest&lt;?&gt;"/>
6155 </method>
6156 <method name="visit" return="V"
6157 abstract="false" native="false" synchronized="false"
6158 static="false" final="false" visibility="public"
6159 deprecated="not deprecated">
6160 <param name="staticInjectionRequest" type="com.google.inject.spi.StaticInjectionRequest"/>
6161 </method>
6162 <method name="visit" return="V"
6163 abstract="false" native="false" synchronized="false"
6164 static="false" final="false" visibility="public"
6165 deprecated="not deprecated">
6166 <param name="privateElements" type="com.google.inject.spi.PrivateElements"/>
6167 </method>
6168 <method name="visit" return="V"
6169 abstract="false" native="false" synchronized="false"
6170 static="false" final="false" visibility="public"
6171 deprecated="not deprecated">
6172 <param name="lookup" type="com.google.inject.spi.MembersInjectorLookup&lt;T&gt;"/>
6173 </method>
6174 <method name="visit" return="V"
6175 abstract="false" native="false" synchronized="false"
6176 static="false" final="false" visibility="public"
6177 deprecated="not deprecated">
6178 <param name="binding" type="com.google.inject.spi.TypeListenerBinding"/>
6179 </method>
6180 <doc>
6181 <![CDATA[No-op visitor for subclassing. All interface methods simply delegate to
6182 {@link #visitOther(Element)}, returning its result.
6183
6184 @param <V> any type to be returned by the visit method. Use {@link Void} with
6185 {@code return null} if no return type is needed.
6186
6187 @author sberlin@gmail.com (Sam Berlin)
6188 @since 2.0]]>
6189 </doc>
6190 </class>
6191 <!-- end class com.google.inject.spi.DefaultElementVisitor -->
6192 <!-- start class com.google.inject.spi.Dependency -->
6193 <class name="Dependency" extends="java.lang.Object"
6194 abstract="false"
6195 static="false" final="true" visibility="public"
6196 deprecated="not deprecated">
6197 <method name="get" return="com.google.inject.spi.Dependency&lt;T&gt;"
6198 abstract="false" native="false" synchronized="false"
6199 static="true" final="false" visibility="public"
6200 deprecated="not deprecated">
6201 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
6202 <doc>
6203 <![CDATA[Returns a new dependency that is not attached to an injection point. The returned dependency is
6204 nullable.]]>
6205 </doc>
6206 </method>
6207 <method name="forInjectionPoints" return="java.util.Set&lt;com.google.inject.spi.Dependency&lt;?&gt;&gt;"
6208 abstract="false" native="false" synchronized="false"
6209 static="true" final="false" visibility="public"
6210 deprecated="not deprecated">
6211 <param name="injectionPoints" type="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"/>
6212 <doc>
6213 <![CDATA[Returns the dependencies from the given injection points.]]>
6214 </doc>
6215 </method>
6216 <method name="getKey" return="com.google.inject.Key&lt;T&gt;"
6217 abstract="false" native="false" synchronized="false"
6218 static="false" final="false" visibility="public"
6219 deprecated="not deprecated">
6220 <doc>
6221 <![CDATA[Returns the key to the binding that satisfies this dependency.]]>
6222 </doc>
6223 </method>
6224 <method name="isNullable" return="boolean"
6225 abstract="false" native="false" synchronized="false"
6226 static="false" final="false" visibility="public"
6227 deprecated="not deprecated">
6228 <doc>
6229 <![CDATA[Returns true if null is a legal value for this dependency.]]>
6230 </doc>
6231 </method>
6232 <method name="getInjectionPoint" return="com.google.inject.spi.InjectionPoint"
6233 abstract="false" native="false" synchronized="false"
6234 static="false" final="false" visibility="public"
6235 deprecated="not deprecated">
6236 <doc>
6237 <![CDATA[Returns the injection point to which this dependency belongs, or null if this dependency isn't
6238 attached to a particular injection point.]]>
6239 </doc>
6240 </method>
6241 <method name="getParameterIndex" return="int"
6242 abstract="false" native="false" synchronized="false"
6243 static="false" final="false" visibility="public"
6244 deprecated="not deprecated">
6245 <doc>
6246 <![CDATA[Returns the index of this dependency in the injection point's parameter list, or {@code -1} if
6247 this dependency does not belong to a parameter list. Only method and constuctor dependencies
6248 are elements in a parameter list.]]>
6249 </doc>
6250 </method>
6251 <method name="hashCode" return="int"
6252 abstract="false" native="false" synchronized="false"
6253 static="false" final="false" visibility="public"
6254 deprecated="not deprecated">
6255 </method>
6256 <method name="equals" return="boolean"
6257 abstract="false" native="false" synchronized="false"
6258 static="false" final="false" visibility="public"
6259 deprecated="not deprecated">
6260 <param name="o" type="java.lang.Object"/>
6261 </method>
6262 <method name="toString" return="java.lang.String"
6263 abstract="false" native="false" synchronized="false"
6264 static="false" final="false" visibility="public"
6265 deprecated="not deprecated">
6266 </method>
6267 <doc>
6268 <![CDATA[A variable that can be resolved by an injector.
6269
6270 <p>Use {@link #get} to build a freestanding dependency, or {@link InjectionPoint} to build one
6271 that's attached to a constructor, method or field.
6272
6273 @author crazybob@google.com (Bob Lee)
6274 @author jessewilson@google.com (Jesse Wilson)
6275 @since 2.0]]>
6276 </doc>
6277 </class>
6278 <!-- end class com.google.inject.spi.Dependency -->
6279 <!-- start interface com.google.inject.spi.Element -->
6280 <interface name="Element" abstract="true"
6281 static="false" final="false" visibility="public"
6282 deprecated="not deprecated">
6283 <method name="getSource" return="java.lang.Object"
6284 abstract="false" native="false" synchronized="false"
6285 static="false" final="false" visibility="public"
6286 deprecated="not deprecated">
6287 <doc>
6288 <![CDATA[Returns an arbitrary object containing information about the "place" where this element was
6289 configured. Used by Guice in the production of descriptive error messages.
6290
6291 <p>Tools might specially handle types they know about; {@code StackTraceElement} is a good
6292 example. Tools should simply call {@code toString()} on the source object if the type is
6293 unfamiliar.]]>
6294 </doc>
6295 </method>
6296 <method name="acceptVisitor" return="T"
6297 abstract="false" native="false" synchronized="false"
6298 static="false" final="false" visibility="public"
6299 deprecated="not deprecated">
6300 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
6301 <doc>
6302 <![CDATA[Accepts an element visitor. Invokes the visitor method specific to this element's type.
6303
6304 @param visitor to call back on]]>
6305 </doc>
6306 </method>
6307 <method name="applyTo"
6308 abstract="false" native="false" synchronized="false"
6309 static="false" final="false" visibility="public"
6310 deprecated="not deprecated">
6311 <param name="binder" type="com.google.inject.Binder"/>
6312 <doc>
6313 <![CDATA[Writes this module element to the given binder (optional operation).
6314
6315 @param binder to apply configuration element to
6316 @throws UnsupportedOperationException if the {@code applyTo} method is not supported by this
6317 element.]]>
6318 </doc>
6319 </method>
6320 <doc>
6321 <![CDATA[A core component of a module or injector.
6322
6323 <p>The elements of a module can be inspected, validated and rewritten. Use {@link
6324 Elements#getElements(com.google.inject.Module[]) Elements.getElements()} to read the elements
6325 from a module, and {@link Elements#getModule(Iterable) Elements.getModule()} to rewrite them.
6326 This can be used for static analysis and generation of Guice modules.
6327
6328 <p>The elements of an injector can be inspected and exercised. Use {@link
6329 com.google.inject.Injector#getBindings Injector.getBindings()} to reflect on Guice injectors.
6330
6331 @author jessewilson@google.com (Jesse Wilson)
6332 @author crazybob@google.com (Bob Lee)
6333 @since 2.0]]>
6334 </doc>
6335 </interface>
6336 <!-- end interface com.google.inject.spi.Element -->
6337 <!-- start class com.google.inject.spi.Elements -->
6338 <class name="Elements" extends="java.lang.Object"
6339 abstract="false"
6340 static="false" final="true" visibility="public"
6341 deprecated="not deprecated">
6342 <constructor name="Elements"
6343 static="false" final="false" visibility="public"
6344 deprecated="not deprecated">
6345 </constructor>
6346 <method name="getElements" return="java.util.List&lt;com.google.inject.spi.Element&gt;"
6347 abstract="false" native="false" synchronized="false"
6348 static="true" final="false" visibility="public"
6349 deprecated="not deprecated">
6350 <param name="modules" type="com.google.inject.Module[]"/>
6351 <doc>
6352 <![CDATA[Records the elements executed by {@code modules}.]]>
6353 </doc>
6354 </method>
6355 <method name="getElements" return="java.util.List&lt;com.google.inject.spi.Element&gt;"
6356 abstract="false" native="false" synchronized="false"
6357 static="true" final="false" visibility="public"
6358 deprecated="not deprecated">
6359 <param name="stage" type="com.google.inject.Stage"/>
6360 <param name="modules" type="com.google.inject.Module[]"/>
6361 <doc>
6362 <![CDATA[Records the elements executed by {@code modules}.]]>
6363 </doc>
6364 </method>
6365 <method name="getElements" return="java.util.List&lt;com.google.inject.spi.Element&gt;"
6366 abstract="false" native="false" synchronized="false"
6367 static="true" final="false" visibility="public"
6368 deprecated="not deprecated">
6369 <param name="modules" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
6370 <doc>
6371 <![CDATA[Records the elements executed by {@code modules}.]]>
6372 </doc>
6373 </method>
6374 <method name="getElements" return="java.util.List&lt;com.google.inject.spi.Element&gt;"
6375 abstract="false" native="false" synchronized="false"
6376 static="true" final="false" visibility="public"
6377 deprecated="not deprecated">
6378 <param name="stage" type="com.google.inject.Stage"/>
6379 <param name="modules" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
6380 <doc>
6381 <![CDATA[Records the elements executed by {@code modules}.]]>
6382 </doc>
6383 </method>
6384 <method name="getModule" return="com.google.inject.Module"
6385 abstract="false" native="false" synchronized="false"
6386 static="true" final="false" visibility="public"
6387 deprecated="not deprecated">
6388 <param name="elements" type="java.lang.Iterable&lt;? extends com.google.inject.spi.Element&gt;"/>
6389 <doc>
6390 <![CDATA[Returns the module composed of {@code elements}.]]>
6391 </doc>
6392 </method>
6393 <doc>
6394 <![CDATA[Exposes elements of a module so they can be inspected, validated or {@link
6395 Element#applyTo(Binder) rewritten}.
6396
6397 @author jessewilson@google.com (Jesse Wilson)
6398 @since 2.0]]>
6399 </doc>
6400 </class>
6401 <!-- end class com.google.inject.spi.Elements -->
6402 <!-- start interface com.google.inject.spi.ElementVisitor -->
6403 <interface name="ElementVisitor" abstract="true"
6404 static="false" final="false" visibility="public"
6405 deprecated="not deprecated">
6406 <method name="visit" return="V"
6407 abstract="false" native="false" synchronized="false"
6408 static="false" final="false" visibility="public"
6409 deprecated="not deprecated">
6410 <param name="binding" type="com.google.inject.Binding&lt;T&gt;"/>
6411 <doc>
6412 <![CDATA[Visit a mapping from a key (type and optional annotation) to the strategy for getting
6413 instances of the type.]]>
6414 </doc>
6415 </method>
6416 <method name="visit" return="V"
6417 abstract="false" native="false" synchronized="false"
6418 static="false" final="false" visibility="public"
6419 deprecated="not deprecated">
6420 <param name="binding" type="com.google.inject.spi.InterceptorBinding"/>
6421 <doc>
6422 <![CDATA[Visit a registration of interceptors for matching methods of matching classes.]]>
6423 </doc>
6424 </method>
6425 <method name="visit" return="V"
6426 abstract="false" native="false" synchronized="false"
6427 static="false" final="false" visibility="public"
6428 deprecated="not deprecated">
6429 <param name="binding" type="com.google.inject.spi.ScopeBinding"/>
6430 <doc>
6431 <![CDATA[Visit a registration of a scope annotation with the scope that implements it.]]>
6432 </doc>
6433 </method>
6434 <method name="visit" return="V"
6435 abstract="false" native="false" synchronized="false"
6436 static="false" final="false" visibility="public"
6437 deprecated="not deprecated">
6438 <param name="binding" type="com.google.inject.spi.TypeConverterBinding"/>
6439 <doc>
6440 <![CDATA[Visit a registration of type converters for matching target types.]]>
6441 </doc>
6442 </method>
6443 <method name="visit" return="V"
6444 abstract="false" native="false" synchronized="false"
6445 static="false" final="false" visibility="public"
6446 deprecated="not deprecated">
6447 <param name="request" type="com.google.inject.spi.InjectionRequest&lt;?&gt;"/>
6448 <doc>
6449 <![CDATA[Visit a request to inject the instance fields and methods of an instance.]]>
6450 </doc>
6451 </method>
6452 <method name="visit" return="V"
6453 abstract="false" native="false" synchronized="false"
6454 static="false" final="false" visibility="public"
6455 deprecated="not deprecated">
6456 <param name="request" type="com.google.inject.spi.StaticInjectionRequest"/>
6457 <doc>
6458 <![CDATA[Visit a request to inject the static fields and methods of type.]]>
6459 </doc>
6460 </method>
6461 <method name="visit" return="V"
6462 abstract="false" native="false" synchronized="false"
6463 static="false" final="false" visibility="public"
6464 deprecated="not deprecated">
6465 <param name="lookup" type="com.google.inject.spi.ProviderLookup&lt;T&gt;"/>
6466 <doc>
6467 <![CDATA[Visit a lookup of the provider for a type.]]>
6468 </doc>
6469 </method>
6470 <method name="visit" return="V"
6471 abstract="false" native="false" synchronized="false"
6472 static="false" final="false" visibility="public"
6473 deprecated="not deprecated">
6474 <param name="lookup" type="com.google.inject.spi.MembersInjectorLookup&lt;T&gt;"/>
6475 <doc>
6476 <![CDATA[Visit a lookup of the members injector.]]>
6477 </doc>
6478 </method>
6479 <method name="visit" return="V"
6480 abstract="false" native="false" synchronized="false"
6481 static="false" final="false" visibility="public"
6482 deprecated="not deprecated">
6483 <param name="message" type="com.google.inject.spi.Message"/>
6484 <doc>
6485 <![CDATA[Visit an error message and the context in which it occured.]]>
6486 </doc>
6487 </method>
6488 <method name="visit" return="V"
6489 abstract="false" native="false" synchronized="false"
6490 static="false" final="false" visibility="public"
6491 deprecated="not deprecated">
6492 <param name="elements" type="com.google.inject.spi.PrivateElements"/>
6493 <doc>
6494 <![CDATA[Visit a collection of configuration elements for a {@linkplain com.google.inject.PrivateBinder
6495 private binder}.]]>
6496 </doc>
6497 </method>
6498 <method name="visit" return="V"
6499 abstract="false" native="false" synchronized="false"
6500 static="false" final="false" visibility="public"
6501 deprecated="not deprecated">
6502 <param name="binding" type="com.google.inject.spi.TypeListenerBinding"/>
6503 <doc>
6504 <![CDATA[Visit an injectable type listener binding.]]>
6505 </doc>
6506 </method>
6507 <doc>
6508 <![CDATA[Visit elements.
6509
6510 @param <V> any type to be returned by the visit method. Use {@link Void} with
6511 {@code return null} if no return type is needed.
6512
6513 @since 2.0]]>
6514 </doc>
6515 </interface>
6516 <!-- end interface com.google.inject.spi.ElementVisitor -->
6517 <!-- start interface com.google.inject.spi.ExposedBinding -->
6518 <interface name="ExposedBinding" abstract="true"
6519 static="false" final="false" visibility="public"
6520 deprecated="not deprecated">
6521 <implements name="com.google.inject.Binding&lt;T&gt;"/>
6522 <implements name="com.google.inject.spi.HasDependencies"/>
6523 <method name="getPrivateElements" return="com.google.inject.spi.PrivateElements"
6524 abstract="false" native="false" synchronized="false"
6525 static="false" final="false" visibility="public"
6526 deprecated="not deprecated">
6527 <doc>
6528 <![CDATA[Returns the enclosed environment that holds the original binding.]]>
6529 </doc>
6530 </method>
6531 <method name="applyTo"
6532 abstract="false" native="false" synchronized="false"
6533 static="false" final="false" visibility="public"
6534 deprecated="not deprecated">
6535 <param name="binder" type="com.google.inject.Binder"/>
6536 <doc>
6537 <![CDATA[Unsupported. Always throws {@link UnsupportedOperationException}.]]>
6538 </doc>
6539 </method>
6540 <doc>
6541 <![CDATA[A binding to a key exposed from an enclosed private environment.
6542
6543 @author jessewilson@google.com (Jesse Wilson)
6544 @since 2.0]]>
6545 </doc>
6546 </interface>
6547 <!-- end interface com.google.inject.spi.ExposedBinding -->
6548 <!-- start interface com.google.inject.spi.HasDependencies -->
6549 <interface name="HasDependencies" abstract="true"
6550 static="false" final="false" visibility="public"
6551 deprecated="not deprecated">
6552 <method name="getDependencies" return="java.util.Set&lt;com.google.inject.spi.Dependency&lt;?&gt;&gt;"
6553 abstract="false" native="false" synchronized="false"
6554 static="false" final="false" visibility="public"
6555 deprecated="not deprecated">
6556 <doc>
6557 <![CDATA[Returns the known dependencies for this type. If this has dependencies whose values are not
6558 known statically, a dependency for the {@link com.google.inject.Injector Injector} will be
6559 included in the returned set.
6560
6561 @return a possibly empty set]]>
6562 </doc>
6563 </method>
6564 <doc>
6565 <![CDATA[Implemented by {@link com.google.inject.Binding bindings}, {@link com.google.inject.Provider
6566 providers} and instances that expose their dependencies explicitly.
6567
6568 @author jessewilson@google.com (Jesse Wilson)
6569 @since 2.0]]>
6570 </doc>
6571 </interface>
6572 <!-- end interface com.google.inject.spi.HasDependencies -->
6573 <!-- start interface com.google.inject.spi.InjectionListener -->
6574 <interface name="InjectionListener" abstract="true"
6575 static="false" final="false" visibility="public"
6576 deprecated="not deprecated">
6577 <method name="afterInjection"
6578 abstract="false" native="false" synchronized="false"
6579 static="false" final="false" visibility="public"
6580 deprecated="not deprecated">
6581 <param name="injectee" type="I"/>
6582 <doc>
6583 <![CDATA[Invoked by Guice after it injects the fields and methods of instance.
6584
6585 @param injectee instance that Guice injected dependencies into]]>
6586 </doc>
6587 </method>
6588 <doc>
6589 <![CDATA[Listens for injections into instances of type {@code I}. Useful for performing further
6590 injections, post-injection initialization, and more.
6591
6592 @author crazybob@google.com (Bob Lee)
6593 @author jessewilson@google.com (Jesse Wilson)
6594 @since 2.0]]>
6595 </doc>
6596 </interface>
6597 <!-- end interface com.google.inject.spi.InjectionListener -->
6598 <!-- start class com.google.inject.spi.InjectionPoint -->
6599 <class name="InjectionPoint" extends="java.lang.Object"
6600 abstract="false"
6601 static="false" final="true" visibility="public"
6602 deprecated="not deprecated">
6603 <method name="getMember" return="java.lang.reflect.Member"
6604 abstract="false" native="false" synchronized="false"
6605 static="false" final="false" visibility="public"
6606 deprecated="not deprecated">
6607 <doc>
6608 <![CDATA[Returns the injected constructor, field, or method.]]>
6609 </doc>
6610 </method>
6611 <method name="getDependencies" return="java.util.List&lt;com.google.inject.spi.Dependency&lt;?&gt;&gt;"
6612 abstract="false" native="false" synchronized="false"
6613 static="false" final="false" visibility="public"
6614 deprecated="not deprecated">
6615 <doc>
6616 <![CDATA[Returns the dependencies for this injection point. If the injection point is for a method or
6617 constructor, the dependencies will correspond to that member's parameters. Field injection
6618 points always have a single dependency for the field itself.
6619
6620 @return a possibly-empty list]]>
6621 </doc>
6622 </method>
6623 <method name="isOptional" return="boolean"
6624 abstract="false" native="false" synchronized="false"
6625 static="false" final="false" visibility="public"
6626 deprecated="not deprecated">
6627 <doc>
6628 <![CDATA[Returns true if this injection point shall be skipped if the injector cannot resolve bindings
6629 for all required dependencies. Both explicit bindings (as specified in a module), and implicit
6630 bindings ({@literal @}{@link com.google.inject.ImplementedBy ImplementedBy}, default
6631 constructors etc.) may be used to satisfy optional injection points.]]>
6632 </doc>
6633 </method>
6634 <method name="isToolable" return="boolean"
6635 abstract="false" native="false" synchronized="false"
6636 static="false" final="false" visibility="public"
6637 deprecated="not deprecated">
6638 <doc>
6639 <![CDATA[Returns true if the element is annotated with {@literal @}{@link Toolable}.
6640
6641 @since 3.0]]>
6642 </doc>
6643 </method>
6644 <method name="getDeclaringType" return="com.google.inject.TypeLiteral&lt;?&gt;"
6645 abstract="false" native="false" synchronized="false"
6646 static="false" final="false" visibility="public"
6647 deprecated="not deprecated">
6648 <doc>
6649 <![CDATA[Returns the generic type that defines this injection point. If the member exists on a
6650 parameterized type, the result will include more type information than the member's {@link
6651 Member#getDeclaringClass() raw declaring class}.
6652
6653 @since 3.0]]>
6654 </doc>
6655 </method>
6656 <method name="equals" return="boolean"
6657 abstract="false" native="false" synchronized="false"
6658 static="false" final="false" visibility="public"
6659 deprecated="not deprecated">
6660 <param name="o" type="java.lang.Object"/>
6661 </method>
6662 <method name="hashCode" return="int"
6663 abstract="false" native="false" synchronized="false"
6664 static="false" final="false" visibility="public"
6665 deprecated="not deprecated">
6666 </method>
6667 <method name="toString" return="java.lang.String"
6668 abstract="false" native="false" synchronized="false"
6669 static="false" final="false" visibility="public"
6670 deprecated="not deprecated">
6671 </method>
6672 <method name="forConstructor" return="com.google.inject.spi.InjectionPoint"
6673 abstract="false" native="false" synchronized="false"
6674 static="true" final="false" visibility="public"
6675 deprecated="not deprecated">
6676 <param name="constructor" type="java.lang.reflect.Constructor&lt;T&gt;"/>
6677 <doc>
6678 <![CDATA[Returns a new injection point for the specified constructor. If the declaring type of {@code
6679 constructor} is parameterized (such as {@code List<T>}), prefer the overload that includes a
6680 type literal.
6681
6682 @param constructor any single constructor present on {@code type}.
6683
6684 @since 3.0]]>
6685 </doc>
6686 </method>
6687 <method name="forConstructor" return="com.google.inject.spi.InjectionPoint"
6688 abstract="false" native="false" synchronized="false"
6689 static="true" final="false" visibility="public"
6690 deprecated="not deprecated">
6691 <param name="constructor" type="java.lang.reflect.Constructor&lt;T&gt;"/>
6692 <param name="type" type="com.google.inject.TypeLiteral&lt;? extends T&gt;"/>
6693 <doc>
6694 <![CDATA[Returns a new injection point for the specified constructor of {@code type}.
6695
6696 @param constructor any single constructor present on {@code type}.
6697 @param type the concrete type that defines {@code constructor}.
6698
6699 @since 3.0]]>
6700 </doc>
6701 </method>
6702 <method name="forConstructorOf" return="com.google.inject.spi.InjectionPoint"
6703 abstract="false" native="false" synchronized="false"
6704 static="true" final="false" visibility="public"
6705 deprecated="not deprecated">
6706 <param name="type" type="com.google.inject.TypeLiteral&lt;?&gt;"/>
6707 <doc>
6708 <![CDATA[Returns a new injection point for the injectable constructor of {@code type}.
6709
6710 @param type a concrete type with exactly one constructor annotated {@literal @}{@link Inject},
6711 or a no-arguments constructor that is not private.
6712 @throws ConfigurationException if there is no injectable constructor, more than one injectable
6713 constructor, or if parameters of the injectable constructor are malformed, such as a
6714 parameter with multiple binding annotations.]]>
6715 </doc>
6716 </method>
6717 <method name="forConstructorOf" return="com.google.inject.spi.InjectionPoint"
6718 abstract="false" native="false" synchronized="false"
6719 static="true" final="false" visibility="public"
6720 deprecated="not deprecated">
6721 <param name="type" type="java.lang.Class&lt;?&gt;"/>
6722 <doc>
6723 <![CDATA[Returns a new injection point for the injectable constructor of {@code type}.
6724
6725 @param type a concrete type with exactly one constructor annotated {@literal @}{@link Inject},
6726 or a no-arguments constructor that is not private.
6727 @throws ConfigurationException if there is no injectable constructor, more than one injectable
6728 constructor, or if parameters of the injectable constructor are malformed, such as a
6729 parameter with multiple binding annotations.]]>
6730 </doc>
6731 </method>
6732 <method name="forStaticMethodsAndFields" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
6733 abstract="false" native="false" synchronized="false"
6734 static="true" final="false" visibility="public"
6735 deprecated="not deprecated">
6736 <param name="type" type="com.google.inject.TypeLiteral&lt;?&gt;"/>
6737 <doc>
6738 <![CDATA[Returns all static method and field injection points on {@code type}.
6739
6740 @return a possibly empty set of injection points. The set has a specified iteration order. All
6741 fields are returned and then all methods. Within the fields, supertype fields are returned
6742 before subtype fields. Similarly, supertype methods are returned before subtype methods.
6743 @throws ConfigurationException if there is a malformed injection point on {@code type}, such as
6744 a field with multiple binding annotations. The exception's {@link
6745 ConfigurationException#getPartialValue() partial value} is a {@code Set<InjectionPoint>}
6746 of the valid injection points.]]>
6747 </doc>
6748 </method>
6749 <method name="forStaticMethodsAndFields" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
6750 abstract="false" native="false" synchronized="false"
6751 static="true" final="false" visibility="public"
6752 deprecated="not deprecated">
6753 <param name="type" type="java.lang.Class&lt;?&gt;"/>
6754 <doc>
6755 <![CDATA[Returns all static method and field injection points on {@code type}.
6756
6757 @return a possibly empty set of injection points. The set has a specified iteration order. All
6758 fields are returned and then all methods. Within the fields, supertype fields are returned
6759 before subtype fields. Similarly, supertype methods are returned before subtype methods.
6760 @throws ConfigurationException if there is a malformed injection point on {@code type}, such as
6761 a field with multiple binding annotations. The exception's {@link
6762 ConfigurationException#getPartialValue() partial value} is a {@code Set<InjectionPoint>}
6763 of the valid injection points.]]>
6764 </doc>
6765 </method>
6766 <method name="forInstanceMethodsAndFields" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
6767 abstract="false" native="false" synchronized="false"
6768 static="true" final="false" visibility="public"
6769 deprecated="not deprecated">
6770 <param name="type" type="com.google.inject.TypeLiteral&lt;?&gt;"/>
6771 <doc>
6772 <![CDATA[Returns all instance method and field injection points on {@code type}.
6773
6774 @return a possibly empty set of injection points. The set has a specified iteration order. All
6775 fields are returned and then all methods. Within the fields, supertype fields are returned
6776 before subtype fields. Similarly, supertype methods are returned before subtype methods.
6777 @throws ConfigurationException if there is a malformed injection point on {@code type}, such as
6778 a field with multiple binding annotations. The exception's {@link
6779 ConfigurationException#getPartialValue() partial value} is a {@code Set<InjectionPoint>}
6780 of the valid injection points.]]>
6781 </doc>
6782 </method>
6783 <method name="forInstanceMethodsAndFields" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
6784 abstract="false" native="false" synchronized="false"
6785 static="true" final="false" visibility="public"
6786 deprecated="not deprecated">
6787 <param name="type" type="java.lang.Class&lt;?&gt;"/>
6788 <doc>
6789 <![CDATA[Returns all instance method and field injection points on {@code type}.
6790
6791 @return a possibly empty set of injection points. The set has a specified iteration order. All
6792 fields are returned and then all methods. Within the fields, supertype fields are returned
6793 before subtype fields. Similarly, supertype methods are returned before subtype methods.
6794 @throws ConfigurationException if there is a malformed injection point on {@code type}, such as
6795 a field with multiple binding annotations. The exception's {@link
6796 ConfigurationException#getPartialValue() partial value} is a {@code Set<InjectionPoint>}
6797 of the valid injection points.]]>
6798 </doc>
6799 </method>
6800 <doc>
6801 <![CDATA[A constructor, field or method that can receive injections. Typically this is a member with the
6802 {@literal @}{@link Inject} annotation. For non-private, no argument constructors, the member may
6803 omit the annotation.
6804
6805 @author crazybob@google.com (Bob Lee)
6806 @since 2.0]]>
6807 </doc>
6808 </class>
6809 <!-- end class com.google.inject.spi.InjectionPoint -->
6810 <!-- start class com.google.inject.spi.InjectionRequest -->
6811 <class name="InjectionRequest" extends="java.lang.Object"
6812 abstract="false"
6813 static="false" final="true" visibility="public"
6814 deprecated="not deprecated">
6815 <implements name="com.google.inject.spi.Element"/>
6816 <constructor name="InjectionRequest" type="java.lang.Object, com.google.inject.TypeLiteral&lt;T&gt;, T"
6817 static="false" final="false" visibility="public"
6818 deprecated="not deprecated">
6819 </constructor>
6820 <method name="getSource" return="java.lang.Object"
6821 abstract="false" native="false" synchronized="false"
6822 static="false" final="false" visibility="public"
6823 deprecated="not deprecated">
6824 </method>
6825 <method name="getInstance" return="T"
6826 abstract="false" native="false" synchronized="false"
6827 static="false" final="false" visibility="public"
6828 deprecated="not deprecated">
6829 </method>
6830 <method name="getType" return="com.google.inject.TypeLiteral&lt;T&gt;"
6831 abstract="false" native="false" synchronized="false"
6832 static="false" final="false" visibility="public"
6833 deprecated="not deprecated">
6834 </method>
6835 <method name="getInjectionPoints" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
6836 abstract="false" native="false" synchronized="false"
6837 static="false" final="false" visibility="public"
6838 deprecated="not deprecated">
6839 <exception name="ConfigurationException" type="com.google.inject.ConfigurationException"/>
6840 <doc>
6841 <![CDATA[Returns the instance methods and fields of {@code instance} that will be injected to fulfill
6842 this request.
6843
6844 @return a possibly empty set of injection points. The set has a specified iteration order. All
6845 fields are returned and then all methods. Within the fields, supertype fields are returned
6846 before subtype fields. Similarly, supertype methods are returned before subtype methods.
6847 @throws ConfigurationException if there is a malformed injection point on the class of {@code
6848 instance}, such as a field with multiple binding annotations. The exception's {@link
6849 ConfigurationException#getPartialValue() partial value} is a {@code Set<InjectionPoint>}
6850 of the valid injection points.]]>
6851 </doc>
6852 </method>
6853 <method name="acceptVisitor" return="R"
6854 abstract="false" native="false" synchronized="false"
6855 static="false" final="false" visibility="public"
6856 deprecated="not deprecated">
6857 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;R&gt;"/>
6858 </method>
6859 <method name="applyTo"
6860 abstract="false" native="false" synchronized="false"
6861 static="false" final="false" visibility="public"
6862 deprecated="not deprecated">
6863 <param name="binder" type="com.google.inject.Binder"/>
6864 </method>
6865 <doc>
6866 <![CDATA[A request to inject the instance fields and methods of an instance. Requests are created
6867 explicitly in a module using {@link com.google.inject.Binder#requestInjection(Object)
6868 requestInjection()} statements:
6869 <pre>
6870 requestInjection(serviceInstance);</pre>
6871
6872 @author mikeward@google.com (Mike Ward)
6873 @since 2.0]]>
6874 </doc>
6875 </class>
6876 <!-- end class com.google.inject.spi.InjectionRequest -->
6877 <!-- start interface com.google.inject.spi.InstanceBinding -->
6878 <interface name="InstanceBinding" abstract="true"
6879 static="false" final="false" visibility="public"
6880 deprecated="not deprecated">
6881 <implements name="com.google.inject.Binding&lt;T&gt;"/>
6882 <implements name="com.google.inject.spi.HasDependencies"/>
6883 <method name="getInstance" return="T"
6884 abstract="false" native="false" synchronized="false"
6885 static="false" final="false" visibility="public"
6886 deprecated="not deprecated">
6887 <doc>
6888 <![CDATA[Returns the user-supplied instance.]]>
6889 </doc>
6890 </method>
6891 <method name="getInjectionPoints" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
6892 abstract="false" native="false" synchronized="false"
6893 static="false" final="false" visibility="public"
6894 deprecated="not deprecated">
6895 <doc>
6896 <![CDATA[Returns the field and method injection points of the instance, injected at injector-creation
6897 time only.
6898
6899 @return a possibly empty set]]>
6900 </doc>
6901 </method>
6902 <doc>
6903 <![CDATA[A binding to a single instance. The same instance is returned for every injection.
6904
6905 @author jessewilson@google.com (Jesse Wilson)
6906 @since 2.0]]>
6907 </doc>
6908 </interface>
6909 <!-- end interface com.google.inject.spi.InstanceBinding -->
6910 <!-- start class com.google.inject.spi.InterceptorBinding -->
6911 <class name="InterceptorBinding" extends="java.lang.Object"
6912 abstract="false"
6913 static="false" final="true" visibility="public"
6914 deprecated="not deprecated">
6915 <implements name="com.google.inject.spi.Element"/>
6916 <method name="getSource" return="java.lang.Object"
6917 abstract="false" native="false" synchronized="false"
6918 static="false" final="false" visibility="public"
6919 deprecated="not deprecated">
6920 </method>
6921 <method name="getClassMatcher" return="com.google.inject.matcher.Matcher&lt;? super java.lang.Class&lt;?&gt;&gt;"
6922 abstract="false" native="false" synchronized="false"
6923 static="false" final="false" visibility="public"
6924 deprecated="not deprecated">
6925 </method>
6926 <method name="getMethodMatcher" return="com.google.inject.matcher.Matcher&lt;? super java.lang.reflect.Method&gt;"
6927 abstract="false" native="false" synchronized="false"
6928 static="false" final="false" visibility="public"
6929 deprecated="not deprecated">
6930 </method>
6931 <method name="getInterceptors" return="java.util.List&lt;org.aopalliance.intercept.MethodInterceptor&gt;"
6932 abstract="false" native="false" synchronized="false"
6933 static="false" final="false" visibility="public"
6934 deprecated="not deprecated">
6935 </method>
6936 <method name="acceptVisitor" return="T"
6937 abstract="false" native="false" synchronized="false"
6938 static="false" final="false" visibility="public"
6939 deprecated="not deprecated">
6940 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
6941 </method>
6942 <method name="applyTo"
6943 abstract="false" native="false" synchronized="false"
6944 static="false" final="false" visibility="public"
6945 deprecated="not deprecated">
6946 <param name="binder" type="com.google.inject.Binder"/>
6947 </method>
6948 <doc>
6949 <![CDATA[Registration of interceptors for matching methods of matching classes. Instances are created
6950 explicitly in a module using {@link com.google.inject.Binder#bindInterceptor(
6951 Matcher, Matcher, MethodInterceptor[]) bindInterceptor()} statements:
6952 <pre>
6953 bindInterceptor(Matchers.subclassesOf(MyAction.class),
6954 Matchers.annotatedWith(Transactional.class),
6955 new MyTransactionInterceptor());</pre>
6956
6957 or from an injectable type listener using {@link TypeEncounter#bindInterceptor(Matcher,
6958 org.aopalliance.intercept.MethodInterceptor[]) TypeEncounter.bindInterceptor()}.
6959
6960 @author jessewilson@google.com (Jesse Wilson)
6961 @since 2.0]]>
6962 </doc>
6963 </class>
6964 <!-- end class com.google.inject.spi.InterceptorBinding -->
6965 <!-- start interface com.google.inject.spi.LinkedKeyBinding -->
6966 <interface name="LinkedKeyBinding" abstract="true"
6967 static="false" final="false" visibility="public"
6968 deprecated="not deprecated">
6969 <implements name="com.google.inject.Binding&lt;T&gt;"/>
6970 <method name="getLinkedKey" return="com.google.inject.Key&lt;? extends T&gt;"
6971 abstract="false" native="false" synchronized="false"
6972 static="false" final="false" visibility="public"
6973 deprecated="not deprecated">
6974 <doc>
6975 <![CDATA[Returns the linked key used to resolve injections. That binding can be retrieved from an
6976 injector using {@link com.google.inject.Injector#getBinding(Key) Injector.getBinding(key)}.]]>
6977 </doc>
6978 </method>
6979 <doc>
6980 <![CDATA[A binding to a linked key. The other key's binding is used to resolve injections.
6981
6982 @author jessewilson@google.com (Jesse Wilson)
6983 @since 2.0]]>
6984 </doc>
6985 </interface>
6986 <!-- end interface com.google.inject.spi.LinkedKeyBinding -->
6987 <!-- start class com.google.inject.spi.MembersInjectorLookup -->
6988 <class name="MembersInjectorLookup" extends="java.lang.Object"
6989 abstract="false"
6990 static="false" final="true" visibility="public"
6991 deprecated="not deprecated">
6992 <implements name="com.google.inject.spi.Element"/>
6993 <constructor name="MembersInjectorLookup" type="java.lang.Object, com.google.inject.TypeLiteral&lt;T&gt;"
6994 static="false" final="false" visibility="public"
6995 deprecated="not deprecated">
6996 </constructor>
6997 <method name="getSource" return="java.lang.Object"
6998 abstract="false" native="false" synchronized="false"
6999 static="false" final="false" visibility="public"
7000 deprecated="not deprecated">
7001 </method>
7002 <method name="getType" return="com.google.inject.TypeLiteral&lt;T&gt;"
7003 abstract="false" native="false" synchronized="false"
7004 static="false" final="false" visibility="public"
7005 deprecated="not deprecated">
7006 <doc>
7007 <![CDATA[Gets the type containing the members to be injected.]]>
7008 </doc>
7009 </method>
7010 <method name="acceptVisitor" return="T"
7011 abstract="false" native="false" synchronized="false"
7012 static="false" final="false" visibility="public"
7013 deprecated="not deprecated">
7014 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
7015 </method>
7016 <method name="initializeDelegate"
7017 abstract="false" native="false" synchronized="false"
7018 static="false" final="false" visibility="public"
7019 deprecated="not deprecated">
7020 <param name="delegate" type="com.google.inject.MembersInjector&lt;T&gt;"/>
7021 <doc>
7022 <![CDATA[Sets the actual members injector.
7023
7024 @throws IllegalStateException if the delegate is already set]]>
7025 </doc>
7026 </method>
7027 <method name="applyTo"
7028 abstract="false" native="false" synchronized="false"
7029 static="false" final="false" visibility="public"
7030 deprecated="not deprecated">
7031 <param name="binder" type="com.google.inject.Binder"/>
7032 </method>
7033 <method name="getDelegate" return="com.google.inject.MembersInjector&lt;T&gt;"
7034 abstract="false" native="false" synchronized="false"
7035 static="false" final="false" visibility="public"
7036 deprecated="not deprecated">
7037 <doc>
7038 <![CDATA[Returns the delegate members injector, or {@code null} if it has not yet been initialized.
7039 The delegate will be initialized when this element is processed, or otherwise used to create
7040 an injector.]]>
7041 </doc>
7042 </method>
7043 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
7044 abstract="false" native="false" synchronized="false"
7045 static="false" final="false" visibility="public"
7046 deprecated="not deprecated">
7047 <doc>
7048 <![CDATA[Returns the looked up members injector. The result is not valid until this lookup has been
7049 initialized, which usually happens when the injector is created. The members injector will
7050 throw an {@code IllegalStateException} if you try to use it beforehand.]]>
7051 </doc>
7052 </method>
7053 <doc>
7054 <![CDATA[A lookup of the members injector for a type. Lookups are created explicitly in a module using
7055 {@link com.google.inject.Binder#getMembersInjector(Class) getMembersInjector()} statements:
7056 <pre>
7057 MembersInjector&lt;PaymentService&gt; membersInjector
7058 = getMembersInjector(PaymentService.class);</pre>
7059
7060 @author crazybob@google.com (Bob Lee)
7061 @since 2.0]]>
7062 </doc>
7063 </class>
7064 <!-- end class com.google.inject.spi.MembersInjectorLookup -->
7065 <!-- start class com.google.inject.spi.Message -->
7066 <class name="Message" extends="java.lang.Object"
7067 abstract="false"
7068 static="false" final="true" visibility="public"
7069 deprecated="not deprecated">
7070 <implements name="java.io.Serializable"/>
7071 <implements name="com.google.inject.spi.Element"/>
7072 <constructor name="Message" type="java.util.List&lt;java.lang.Object&gt;, java.lang.String, java.lang.Throwable"
7073 static="false" final="false" visibility="public"
7074 deprecated="not deprecated">
7075 <doc>
7076 <![CDATA[@since 2.0]]>
7077 </doc>
7078 </constructor>
7079 <constructor name="Message" type="java.lang.Object, java.lang.String"
7080 static="false" final="false" visibility="public"
7081 deprecated="not deprecated">
7082 </constructor>
7083 <constructor name="Message" type="java.lang.String"
7084 static="false" final="false" visibility="public"
7085 deprecated="not deprecated">
7086 </constructor>
7087 <method name="getSource" return="java.lang.String"
7088 abstract="false" native="false" synchronized="false"
7089 static="false" final="false" visibility="public"
7090 deprecated="not deprecated">
7091 </method>
7092 <method name="getSources" return="java.util.List&lt;java.lang.Object&gt;"
7093 abstract="false" native="false" synchronized="false"
7094 static="false" final="false" visibility="public"
7095 deprecated="not deprecated">
7096 <doc>
7097 <![CDATA[@since 2.0]]>
7098 </doc>
7099 </method>
7100 <method name="getMessage" return="java.lang.String"
7101 abstract="false" native="false" synchronized="false"
7102 static="false" final="false" visibility="public"
7103 deprecated="not deprecated">
7104 <doc>
7105 <![CDATA[Gets the error message text.]]>
7106 </doc>
7107 </method>
7108 <method name="acceptVisitor" return="T"
7109 abstract="false" native="false" synchronized="false"
7110 static="false" final="false" visibility="public"
7111 deprecated="not deprecated">
7112 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
7113 <doc>
7114 <![CDATA[@since 2.0]]>
7115 </doc>
7116 </method>
7117 <method name="getCause" return="java.lang.Throwable"
7118 abstract="false" native="false" synchronized="false"
7119 static="false" final="false" visibility="public"
7120 deprecated="not deprecated">
7121 <doc>
7122 <![CDATA[Returns the throwable that caused this message, or {@code null} if this
7123 message was not caused by a throwable.
7124
7125 @since 2.0]]>
7126 </doc>
7127 </method>
7128 <method name="toString" return="java.lang.String"
7129 abstract="false" native="false" synchronized="false"
7130 static="false" final="false" visibility="public"
7131 deprecated="not deprecated">
7132 </method>
7133 <method name="hashCode" return="int"
7134 abstract="false" native="false" synchronized="false"
7135 static="false" final="false" visibility="public"
7136 deprecated="not deprecated">
7137 </method>
7138 <method name="equals" return="boolean"
7139 abstract="false" native="false" synchronized="false"
7140 static="false" final="false" visibility="public"
7141 deprecated="not deprecated">
7142 <param name="o" type="java.lang.Object"/>
7143 </method>
7144 <method name="applyTo"
7145 abstract="false" native="false" synchronized="false"
7146 static="false" final="false" visibility="public"
7147 deprecated="not deprecated">
7148 <param name="binder" type="com.google.inject.Binder"/>
7149 <doc>
7150 <![CDATA[@since 2.0]]>
7151 </doc>
7152 </method>
7153 <doc>
7154 <![CDATA[An error message and the context in which it occured. Messages are usually created internally by
7155 Guice and its extensions. Messages can be created explicitly in a module using {@link
7156 com.google.inject.Binder#addError(Throwable) addError()} statements:
7157 <pre>
7158 try {
7159 bindPropertiesFromFile();
7160 } catch (IOException e) {
7161 addError(e);
7162 }</pre>
7163
7164 @author crazybob@google.com (Bob Lee)]]>
7165 </doc>
7166 </class>
7167 <!-- end class com.google.inject.spi.Message -->
7168 <!-- start interface com.google.inject.spi.PrivateElements -->
7169 <interface name="PrivateElements" abstract="true"
7170 static="false" final="false" visibility="public"
7171 deprecated="not deprecated">
7172 <implements name="com.google.inject.spi.Element"/>
7173 <method name="getElements" return="java.util.List&lt;com.google.inject.spi.Element&gt;"
7174 abstract="false" native="false" synchronized="false"
7175 static="false" final="false" visibility="public"
7176 deprecated="not deprecated">
7177 <doc>
7178 <![CDATA[Returns the configuration information in this private environment.]]>
7179 </doc>
7180 </method>
7181 <method name="getInjector" return="com.google.inject.Injector"
7182 abstract="false" native="false" synchronized="false"
7183 static="false" final="false" visibility="public"
7184 deprecated="not deprecated">
7185 <doc>
7186 <![CDATA[Returns the child injector that hosts these private elements, or null if the elements haven't
7187 been used to create an injector.]]>
7188 </doc>
7189 </method>
7190 <method name="getExposedKeys" return="java.util.Set&lt;com.google.inject.Key&lt;?&gt;&gt;"
7191 abstract="false" native="false" synchronized="false"
7192 static="false" final="false" visibility="public"
7193 deprecated="not deprecated">
7194 <doc>
7195 <![CDATA[Returns the unique exposed keys for these private elements.]]>
7196 </doc>
7197 </method>
7198 <method name="getExposedSource" return="java.lang.Object"
7199 abstract="false" native="false" synchronized="false"
7200 static="false" final="false" visibility="public"
7201 deprecated="not deprecated">
7202 <param name="key" type="com.google.inject.Key&lt;?&gt;"/>
7203 <doc>
7204 <![CDATA[Returns an arbitrary object containing information about the "place" where this key was
7205 exposed. Used by Guice in the production of descriptive error messages.
7206
7207 <p>Tools might specially handle types they know about; {@code StackTraceElement} is a good
7208 example. Tools should simply call {@code toString()} on the source object if the type is
7209 unfamiliar.
7210
7211 @param key one of the keys exposed by this module.]]>
7212 </doc>
7213 </method>
7214 <doc>
7215 <![CDATA[A private collection of elements that are hidden from the enclosing injector or module by
7216 default. See {@link com.google.inject.PrivateModule PrivateModule} for details.
7217
7218 @author jessewilson@google.com (Jesse Wilson)
7219 @since 2.0]]>
7220 </doc>
7221 </interface>
7222 <!-- end interface com.google.inject.spi.PrivateElements -->
7223 <!-- start interface com.google.inject.spi.ProviderBinding -->
7224 <interface name="ProviderBinding" abstract="true"
7225 static="false" final="false" visibility="public"
7226 deprecated="not deprecated">
7227 <implements name="com.google.inject.Binding&lt;T&gt;"/>
7228 <method name="getProvidedKey" return="com.google.inject.Key&lt;?&gt;"
7229 abstract="false" native="false" synchronized="false"
7230 static="false" final="false" visibility="public"
7231 deprecated="not deprecated">
7232 <doc>
7233 <![CDATA[Returns the key whose binding is used to {@link Provider#get provide instances}. That binding
7234 can be retrieved from an injector using {@link com.google.inject.Injector#getBinding(Key)
7235 Injector.getBinding(providedKey)}]]>
7236 </doc>
7237 </method>
7238 <doc>
7239 <![CDATA[A binding to a {@link Provider} that delegates to the binding for the provided type. This binding
7240 is used whenever a {@code Provider<T>} is injected (as opposed to injecting {@code T} directly).
7241
7242 @author jessewilson@google.com (Jesse Wilson)
7243 @since 2.0]]>
7244 </doc>
7245 </interface>
7246 <!-- end interface com.google.inject.spi.ProviderBinding -->
7247 <!-- start interface com.google.inject.spi.ProviderInstanceBinding -->
7248 <interface name="ProviderInstanceBinding" abstract="true"
7249 static="false" final="false" visibility="public"
7250 deprecated="not deprecated">
7251 <implements name="com.google.inject.Binding&lt;T&gt;"/>
7252 <implements name="com.google.inject.spi.HasDependencies"/>
7253 <method name="getProviderInstance" return="com.google.inject.Provider&lt;? extends T&gt;"
7254 abstract="false" native="false" synchronized="false"
7255 static="false" final="false" visibility="public"
7256 deprecated="not deprecated">
7257 <doc>
7258 <![CDATA[Returns the user-supplied, unscoped provider.]]>
7259 </doc>
7260 </method>
7261 <method name="getInjectionPoints" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
7262 abstract="false" native="false" synchronized="false"
7263 static="false" final="false" visibility="public"
7264 deprecated="not deprecated">
7265 <doc>
7266 <![CDATA[Returns the field and method injection points of the provider, injected at injector-creation
7267 time only.
7268
7269 @return a possibly empty set]]>
7270 </doc>
7271 </method>
7272 <doc>
7273 <![CDATA[A binding to a provider instance. The provider's {@code get} method is invoked to resolve
7274 injections.
7275
7276 @author jessewilson@google.com (Jesse Wilson)
7277 @since 2.0]]>
7278 </doc>
7279 </interface>
7280 <!-- end interface com.google.inject.spi.ProviderInstanceBinding -->
7281 <!-- start interface com.google.inject.spi.ProviderKeyBinding -->
7282 <interface name="ProviderKeyBinding" abstract="true"
7283 static="false" final="false" visibility="public"
7284 deprecated="not deprecated">
7285 <implements name="com.google.inject.Binding&lt;T&gt;"/>
7286 <method name="getProviderKey" return="com.google.inject.Key&lt;? extends javax.inject.Provider&lt;? extends T&gt;&gt;"
7287 abstract="false" native="false" synchronized="false"
7288 static="false" final="false" visibility="public"
7289 deprecated="not deprecated">
7290 <doc>
7291 <![CDATA[Returns the key used to resolve the provider's binding. That binding can be retrieved from an
7292 injector using {@link com.google.inject.Injector#getBinding(Key)
7293 Injector.getBinding(providerKey)}]]>
7294 </doc>
7295 </method>
7296 <doc>
7297 <![CDATA[A binding to a provider key. To resolve injections, the provider key is first resolved, then that
7298 provider's {@code get} method is invoked.
7299
7300 @author jessewilson@google.com (Jesse Wilson)
7301 @since 2.0]]>
7302 </doc>
7303 </interface>
7304 <!-- end interface com.google.inject.spi.ProviderKeyBinding -->
7305 <!-- start class com.google.inject.spi.ProviderLookup -->
7306 <class name="ProviderLookup" extends="java.lang.Object"
7307 abstract="false"
7308 static="false" final="true" visibility="public"
7309 deprecated="not deprecated">
7310 <implements name="com.google.inject.spi.Element"/>
7311 <constructor name="ProviderLookup" type="java.lang.Object, com.google.inject.Key&lt;T&gt;"
7312 static="false" final="false" visibility="public"
7313 deprecated="not deprecated">
7314 </constructor>
7315 <method name="getSource" return="java.lang.Object"
7316 abstract="false" native="false" synchronized="false"
7317 static="false" final="false" visibility="public"
7318 deprecated="not deprecated">
7319 </method>
7320 <method name="getKey" return="com.google.inject.Key&lt;T&gt;"
7321 abstract="false" native="false" synchronized="false"
7322 static="false" final="false" visibility="public"
7323 deprecated="not deprecated">
7324 </method>
7325 <method name="acceptVisitor" return="T"
7326 abstract="false" native="false" synchronized="false"
7327 static="false" final="false" visibility="public"
7328 deprecated="not deprecated">
7329 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
7330 </method>
7331 <method name="initializeDelegate"
7332 abstract="false" native="false" synchronized="false"
7333 static="false" final="false" visibility="public"
7334 deprecated="not deprecated">
7335 <param name="delegate" type="com.google.inject.Provider&lt;T&gt;"/>
7336 <doc>
7337 <![CDATA[Sets the actual provider.
7338
7339 @throws IllegalStateException if the delegate is already set]]>
7340 </doc>
7341 </method>
7342 <method name="applyTo"
7343 abstract="false" native="false" synchronized="false"
7344 static="false" final="false" visibility="public"
7345 deprecated="not deprecated">
7346 <param name="binder" type="com.google.inject.Binder"/>
7347 </method>
7348 <method name="getDelegate" return="com.google.inject.Provider&lt;T&gt;"
7349 abstract="false" native="false" synchronized="false"
7350 static="false" final="false" visibility="public"
7351 deprecated="not deprecated">
7352 <doc>
7353 <![CDATA[Returns the delegate provider, or {@code null} if it has not yet been initialized. The delegate
7354 will be initialized when this element is processed, or otherwise used to create an injector.]]>
7355 </doc>
7356 </method>
7357 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
7358 abstract="false" native="false" synchronized="false"
7359 static="false" final="false" visibility="public"
7360 deprecated="not deprecated">
7361 <doc>
7362 <![CDATA[Returns the looked up provider. The result is not valid until this lookup has been initialized,
7363 which usually happens when the injector is created. The provider will throw an {@code
7364 IllegalStateException} if you try to use it beforehand.]]>
7365 </doc>
7366 </method>
7367 <doc>
7368 <![CDATA[A lookup of the provider for a type. Lookups are created explicitly in a module using
7369 {@link com.google.inject.Binder#getProvider(Class) getProvider()} statements:
7370 <pre>
7371 Provider&lt;PaymentService&gt; paymentServiceProvider
7372 = getProvider(PaymentService.class);</pre>
7373
7374 @author jessewilson@google.com (Jesse Wilson)
7375 @since 2.0]]>
7376 </doc>
7377 </class>
7378 <!-- end class com.google.inject.spi.ProviderLookup -->
7379 <!-- start interface com.google.inject.spi.ProviderWithDependencies -->
7380 <interface name="ProviderWithDependencies" abstract="true"
7381 static="false" final="false" visibility="public"
7382 deprecated="not deprecated">
7383 <implements name="com.google.inject.Provider&lt;T&gt;"/>
7384 <implements name="com.google.inject.spi.HasDependencies"/>
7385 <doc>
7386 <![CDATA[A provider with dependencies on other injected types. If a {@link Provider} has dependencies that
7387 aren't specified in injections, this interface should be used to expose all dependencies.
7388
7389 @since 2.0]]>
7390 </doc>
7391 </interface>
7392 <!-- end interface com.google.inject.spi.ProviderWithDependencies -->
7393 <!-- start interface com.google.inject.spi.ProviderWithExtensionVisitor -->
7394 <interface name="ProviderWithExtensionVisitor" abstract="true"
7395 static="false" final="false" visibility="public"
7396 deprecated="not deprecated">
7397 <implements name="com.google.inject.Provider&lt;T&gt;"/>
7398 <method name="acceptExtensionVisitor" return="V"
7399 abstract="false" native="false" synchronized="false"
7400 static="false" final="false" visibility="public"
7401 deprecated="not deprecated">
7402 <param name="visitor" type="com.google.inject.spi.BindingTargetVisitor&lt;B, V&gt;"/>
7403 <param name="binding" type="com.google.inject.spi.ProviderInstanceBinding&lt;? extends B&gt;"/>
7404 <doc>
7405 <![CDATA[Instructs the extension determine if the visitor is an instance of a custom
7406 extension visitor, and if so, visit it using that method. If the visitor is
7407 not an instance of the custom extension visitor, this method <b>MUST</b>
7408 call visitor.visit(binding).
7409 <p>
7410 Due to issues with generics, the type parameters of this method do not
7411 relate to the type of the provider. In practice, the 'B' type will always
7412 be a supertype of 'T'.]]>
7413 </doc>
7414 </method>
7415 <doc>
7416 <![CDATA[A Provider that is part of an extension which supports a custom
7417 BindingTargetVisitor.
7418 <p>
7419 When an extension binds a provider instance, the provider can implement this
7420 interface to allow users using the
7421 {@link Binding#acceptTargetVisitor(BindingTargetVisitor)} method to visit a
7422 custom visitor designed for that extension. A typical implementation within
7423 the extension would look like
7424 <pre>
7425 &lt;V, B> V acceptExtensionVisitor(BindingTargetVisitor&lt;B, V> visitor, ProviderInstanceBinding&lt;? extends B> binding) {
7426 if(visitor instanceof MyCustomExtensionVisitor) {
7427 return ((MyCustomExtensionVisitor&lt;B, V>)visitor).visitCustomExtension(customProperties, binding);
7428 } else {
7429 return visitor.visit(binding);
7430 }
7431 }</pre>
7432 'MyCustomExtensionVisitor' in the example above would be an interface the
7433 extension provides that users can implement in order to be notified of custom
7434 extension information. These visitor interfaces must extend from
7435 BindingTargetVisitor.
7436
7437 @since 3.0
7438 @author sameb@google.com (Sam Berlin)]]>
7439 </doc>
7440 </interface>
7441 <!-- end interface com.google.inject.spi.ProviderWithExtensionVisitor -->
7442 <!-- start class com.google.inject.spi.ScopeBinding -->
7443 <class name="ScopeBinding" extends="java.lang.Object"
7444 abstract="false"
7445 static="false" final="true" visibility="public"
7446 deprecated="not deprecated">
7447 <implements name="com.google.inject.spi.Element"/>
7448 <method name="getSource" return="java.lang.Object"
7449 abstract="false" native="false" synchronized="false"
7450 static="false" final="false" visibility="public"
7451 deprecated="not deprecated">
7452 </method>
7453 <method name="getAnnotationType" return="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"
7454 abstract="false" native="false" synchronized="false"
7455 static="false" final="false" visibility="public"
7456 deprecated="not deprecated">
7457 </method>
7458 <method name="getScope" return="com.google.inject.Scope"
7459 abstract="false" native="false" synchronized="false"
7460 static="false" final="false" visibility="public"
7461 deprecated="not deprecated">
7462 </method>
7463 <method name="acceptVisitor" return="T"
7464 abstract="false" native="false" synchronized="false"
7465 static="false" final="false" visibility="public"
7466 deprecated="not deprecated">
7467 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
7468 </method>
7469 <method name="applyTo"
7470 abstract="false" native="false" synchronized="false"
7471 static="false" final="false" visibility="public"
7472 deprecated="not deprecated">
7473 <param name="binder" type="com.google.inject.Binder"/>
7474 </method>
7475 <doc>
7476 <![CDATA[Registration of a scope annotation with the scope that implements it. Instances are created
7477 explicitly in a module using {@link com.google.inject.Binder#bindScope(Class, Scope) bindScope()}
7478 statements:
7479 <pre>
7480 Scope recordScope = new RecordScope();
7481 bindScope(RecordScoped.class, new RecordScope());</pre>
7482
7483 @author jessewilson@google.com (Jesse Wilson)
7484 @since 2.0]]>
7485 </doc>
7486 </class>
7487 <!-- end class com.google.inject.spi.ScopeBinding -->
7488 <!-- start class com.google.inject.spi.StaticInjectionRequest -->
7489 <class name="StaticInjectionRequest" extends="java.lang.Object"
7490 abstract="false"
7491 static="false" final="true" visibility="public"
7492 deprecated="not deprecated">
7493 <implements name="com.google.inject.spi.Element"/>
7494 <method name="getSource" return="java.lang.Object"
7495 abstract="false" native="false" synchronized="false"
7496 static="false" final="false" visibility="public"
7497 deprecated="not deprecated">
7498 </method>
7499 <method name="getType" return="java.lang.Class&lt;?&gt;"
7500 abstract="false" native="false" synchronized="false"
7501 static="false" final="false" visibility="public"
7502 deprecated="not deprecated">
7503 </method>
7504 <method name="getInjectionPoints" return="java.util.Set&lt;com.google.inject.spi.InjectionPoint&gt;"
7505 abstract="false" native="false" synchronized="false"
7506 static="false" final="false" visibility="public"
7507 deprecated="not deprecated">
7508 <exception name="ConfigurationException" type="com.google.inject.ConfigurationException"/>
7509 <doc>
7510 <![CDATA[Returns the static methods and fields of {@code type} that will be injected to fulfill this
7511 request.
7512
7513 @return a possibly empty set of injection points. The set has a specified iteration order. All
7514 fields are returned and then all methods. Within the fields, supertype fields are returned
7515 before subtype fields. Similarly, supertype methods are returned before subtype methods.
7516 @throws ConfigurationException if there is a malformed injection point on {@code type}, such as
7517 a field with multiple binding annotations. The exception's {@link
7518 ConfigurationException#getPartialValue() partial value} is a {@code Set<InjectionPoint>}
7519 of the valid injection points.]]>
7520 </doc>
7521 </method>
7522 <method name="applyTo"
7523 abstract="false" native="false" synchronized="false"
7524 static="false" final="false" visibility="public"
7525 deprecated="not deprecated">
7526 <param name="binder" type="com.google.inject.Binder"/>
7527 </method>
7528 <method name="acceptVisitor" return="T"
7529 abstract="false" native="false" synchronized="false"
7530 static="false" final="false" visibility="public"
7531 deprecated="not deprecated">
7532 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
7533 </method>
7534 <doc>
7535 <![CDATA[A request to inject the static fields and methods of a type. Requests are created
7536 explicitly in a module using {@link com.google.inject.Binder#requestStaticInjection(Class[])
7537 requestStaticInjection()} statements:
7538 <pre>
7539 requestStaticInjection(MyLegacyService.class);</pre>
7540
7541 @author jessewilson@google.com (Jesse Wilson)
7542 @since 2.0]]>
7543 </doc>
7544 </class>
7545 <!-- end class com.google.inject.spi.StaticInjectionRequest -->
7546 <!-- start class com.google.inject.spi.Toolable -->
7547 <class name="Toolable" abstract="true"
7548 static="false" final="false" visibility="public"
7549 deprecated="not deprecated">
7550 <implements name="java.lang.annotation.Annotation"/>
7551 <doc>
7552 <![CDATA[Instructs an {@link Injector} running in {@link Stage#TOOL} that a method should be injected.
7553 This is typically useful for for extensions to Guice that perform additional validation in an
7554 injected method or field. This only applies to objects that are already constructed when
7555 bindings are created (ie., something bound using {@link
7556 com.google.inject.binder.LinkedBindingBuilder#toProvider toProvider}, {@link
7557 com.google.inject.binder.LinkedBindingBuilder#toInstance toInstance}, or {@link
7558 com.google.inject.Binder#requestInjection requestInjection}.
7559
7560 @author sberlin@gmail.com (Sam Berlin)
7561 @since 3.0]]>
7562 </doc>
7563 </class>
7564 <!-- end class com.google.inject.spi.Toolable -->
7565 <!-- start interface com.google.inject.spi.TypeConverter -->
7566 <interface name="TypeConverter" abstract="true"
7567 static="false" final="false" visibility="public"
7568 deprecated="not deprecated">
7569 <method name="convert" return="java.lang.Object"
7570 abstract="false" native="false" synchronized="false"
7571 static="false" final="false" visibility="public"
7572 deprecated="not deprecated">
7573 <param name="value" type="java.lang.String"/>
7574 <param name="toType" type="com.google.inject.TypeLiteral&lt;?&gt;"/>
7575 <doc>
7576 <![CDATA[Converts a string value. Throws an exception if a conversion error occurs.]]>
7577 </doc>
7578 </method>
7579 <doc>
7580 <![CDATA[Converts constant string values to a different type.
7581
7582 @author crazybob@google.com (Bob Lee)
7583 @since 2.0]]>
7584 </doc>
7585 </interface>
7586 <!-- end interface com.google.inject.spi.TypeConverter -->
7587 <!-- start class com.google.inject.spi.TypeConverterBinding -->
7588 <class name="TypeConverterBinding" extends="java.lang.Object"
7589 abstract="false"
7590 static="false" final="true" visibility="public"
7591 deprecated="not deprecated">
7592 <implements name="com.google.inject.spi.Element"/>
7593 <method name="getSource" return="java.lang.Object"
7594 abstract="false" native="false" synchronized="false"
7595 static="false" final="false" visibility="public"
7596 deprecated="not deprecated">
7597 </method>
7598 <method name="getTypeMatcher" return="com.google.inject.matcher.Matcher&lt;? super com.google.inject.TypeLiteral&lt;?&gt;&gt;"
7599 abstract="false" native="false" synchronized="false"
7600 static="false" final="false" visibility="public"
7601 deprecated="not deprecated">
7602 </method>
7603 <method name="getTypeConverter" return="com.google.inject.spi.TypeConverter"
7604 abstract="false" native="false" synchronized="false"
7605 static="false" final="false" visibility="public"
7606 deprecated="not deprecated">
7607 </method>
7608 <method name="acceptVisitor" return="T"
7609 abstract="false" native="false" synchronized="false"
7610 static="false" final="false" visibility="public"
7611 deprecated="not deprecated">
7612 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
7613 </method>
7614 <method name="applyTo"
7615 abstract="false" native="false" synchronized="false"
7616 static="false" final="false" visibility="public"
7617 deprecated="not deprecated">
7618 <param name="binder" type="com.google.inject.Binder"/>
7619 </method>
7620 <doc>
7621 <![CDATA[Registration of type converters for matching target types. Instances are created
7622 explicitly in a module using {@link com.google.inject.Binder#convertToTypes(Matcher,
7623 TypeConverter) convertToTypes()} statements:
7624 <pre>
7625 convertToTypes(Matchers.only(TypeLiteral.get(DateTime.class)), new DateTimeConverter());</pre>
7626
7627 @author jessewilson@google.com (Jesse Wilson)
7628 @since 2.0]]>
7629 </doc>
7630 </class>
7631 <!-- end class com.google.inject.spi.TypeConverterBinding -->
7632 <!-- start interface com.google.inject.spi.TypeEncounter -->
7633 <interface name="TypeEncounter" abstract="true"
7634 static="false" final="false" visibility="public"
7635 deprecated="not deprecated">
7636 <method name="addError"
7637 abstract="false" native="false" synchronized="false"
7638 static="false" final="false" visibility="public"
7639 deprecated="not deprecated">
7640 <param name="message" type="java.lang.String"/>
7641 <param name="arguments" type="java.lang.Object[]"/>
7642 <doc>
7643 <![CDATA[Records an error message for type {@code I} which will be presented to the user at a later
7644 time. Unlike throwing an exception, this enable us to continue configuring the Injector and
7645 discover more errors. Uses {@link String#format(String, Object[])} to insert the arguments
7646 into the message.]]>
7647 </doc>
7648 </method>
7649 <method name="addError"
7650 abstract="false" native="false" synchronized="false"
7651 static="false" final="false" visibility="public"
7652 deprecated="not deprecated">
7653 <param name="t" type="java.lang.Throwable"/>
7654 <doc>
7655 <![CDATA[Records an exception for type {@code I}, the full details of which will be logged, and the
7656 message of which will be presented to the user at a later time. If your type listener calls
7657 something that you worry may fail, you should catch the exception and pass it to this method.]]>
7658 </doc>
7659 </method>
7660 <method name="addError"
7661 abstract="false" native="false" synchronized="false"
7662 static="false" final="false" visibility="public"
7663 deprecated="not deprecated">
7664 <param name="message" type="com.google.inject.spi.Message"/>
7665 <doc>
7666 <![CDATA[Records an error message to be presented to the user at a later time.]]>
7667 </doc>
7668 </method>
7669 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
7670 abstract="false" native="false" synchronized="false"
7671 static="false" final="false" visibility="public"
7672 deprecated="not deprecated">
7673 <param name="key" type="com.google.inject.Key&lt;T&gt;"/>
7674 <doc>
7675 <![CDATA[Returns the provider used to obtain instances for the given injection key. The returned
7676 provider will not be valid until the injector has been created. The provider will throw an
7677 {@code IllegalStateException} if you try to use it beforehand.]]>
7678 </doc>
7679 </method>
7680 <method name="getProvider" return="com.google.inject.Provider&lt;T&gt;"
7681 abstract="false" native="false" synchronized="false"
7682 static="false" final="false" visibility="public"
7683 deprecated="not deprecated">
7684 <param name="type" type="java.lang.Class&lt;T&gt;"/>
7685 <doc>
7686 <![CDATA[Returns the provider used to obtain instances for the given injection type. The returned
7687 provider will not be valid until the injetor has been created. The provider will throw an
7688 {@code IllegalStateException} if you try to use it beforehand.]]>
7689 </doc>
7690 </method>
7691 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
7692 abstract="false" native="false" synchronized="false"
7693 static="false" final="false" visibility="public"
7694 deprecated="not deprecated">
7695 <param name="typeLiteral" type="com.google.inject.TypeLiteral&lt;T&gt;"/>
7696 <doc>
7697 <![CDATA[Returns the members injector used to inject dependencies into methods and fields on instances
7698 of the given type {@code T}. The returned members injector will not be valid until the main
7699 injector has been created. The members injector will throw an {@code IllegalStateException}
7700 if you try to use it beforehand.
7701
7702 @param typeLiteral type to get members injector for]]>
7703 </doc>
7704 </method>
7705 <method name="getMembersInjector" return="com.google.inject.MembersInjector&lt;T&gt;"
7706 abstract="false" native="false" synchronized="false"
7707 static="false" final="false" visibility="public"
7708 deprecated="not deprecated">
7709 <param name="type" type="java.lang.Class&lt;T&gt;"/>
7710 <doc>
7711 <![CDATA[Returns the members injector used to inject dependencies into methods and fields on instances
7712 of the given type {@code T}. The returned members injector will not be valid until the main
7713 injector has been created. The members injector will throw an {@code IllegalStateException}
7714 if you try to use it beforehand.
7715
7716 @param type type to get members injector for]]>
7717 </doc>
7718 </method>
7719 <method name="register"
7720 abstract="false" native="false" synchronized="false"
7721 static="false" final="false" visibility="public"
7722 deprecated="not deprecated">
7723 <param name="membersInjector" type="com.google.inject.MembersInjector&lt;? super I&gt;"/>
7724 <doc>
7725 <![CDATA[Registers a members injector for type {@code I}. Guice will use the members injector after its
7726 performed its own injections on an instance of {@code I}.]]>
7727 </doc>
7728 </method>
7729 <method name="register"
7730 abstract="false" native="false" synchronized="false"
7731 static="false" final="false" visibility="public"
7732 deprecated="not deprecated">
7733 <param name="listener" type="com.google.inject.spi.InjectionListener&lt;? super I&gt;"/>
7734 <doc>
7735 <![CDATA[Registers an injection listener for type {@code I}. Guice will notify the listener after all
7736 injections have been performed on an instance of {@code I}.]]>
7737 </doc>
7738 </method>
7739 <method name="bindInterceptor"
7740 abstract="false" native="false" synchronized="false"
7741 static="false" final="false" visibility="public"
7742 deprecated="not deprecated">
7743 <param name="methodMatcher" type="com.google.inject.matcher.Matcher&lt;? super java.lang.reflect.Method&gt;"/>
7744 <param name="interceptors" type="org.aopalliance.intercept.MethodInterceptor[]"/>
7745 <doc>
7746 <![CDATA[Binds method interceptor[s] to methods matched in type {@code I} and its supertypes. A
7747 method is eligible for interception if:
7748
7749 <ul>
7750 <li>Guice created the instance the method is on</li>
7751 <li>Neither the enclosing type nor the method is final</li>
7752 <li>And the method is package-private or more accessible</li>
7753 </ul>
7754
7755 @param methodMatcher matches methods the interceptor should apply to. For
7756 example: {@code annotatedWith(Transactional.class)}.
7757 @param interceptors to bind]]>
7758 </doc>
7759 </method>
7760 <doc>
7761 <![CDATA[Context of an injectable type encounter. Enables reporting errors, registering injection
7762 listeners and binding method interceptors for injectable type {@code I}. It is an error to use
7763 an encounter after the {@link TypeListener#hear(TypeLiteral, TypeEncounter) hear()} method has
7764 returned.
7765
7766 @param <I> the injectable type encountered
7767 @since 2.0]]>
7768 </doc>
7769 </interface>
7770 <!-- end interface com.google.inject.spi.TypeEncounter -->
7771 <!-- start interface com.google.inject.spi.TypeListener -->
7772 <interface name="TypeListener" abstract="true"
7773 static="false" final="false" visibility="public"
7774 deprecated="not deprecated">
7775 <method name="hear"
7776 abstract="false" native="false" synchronized="false"
7777 static="false" final="false" visibility="public"
7778 deprecated="not deprecated">
7779 <param name="type" type="com.google.inject.TypeLiteral&lt;I&gt;"/>
7780 <param name="encounter" type="com.google.inject.spi.TypeEncounter&lt;I&gt;"/>
7781 <doc>
7782 <![CDATA[Invoked when Guice encounters a new type eligible for constructor or members injection.
7783 Called during injector creation (or afterwords if Guice encounters a type at run time and
7784 creates a JIT binding).
7785
7786 @param type encountered by Guice
7787 @param encounter context of this encounter, enables reporting errors, registering injection
7788 listeners and binding method interceptors for {@code type}.
7789
7790 @param <I> the injectable type]]>
7791 </doc>
7792 </method>
7793 <doc>
7794 <![CDATA[Listens for Guice to encounter injectable types. If a given type has its constructor injected in
7795 one situation but only its methods and fields injected in another, Guice will notify this
7796 listener once.
7797
7798 <p>Useful for extra type checking, {@linkplain TypeEncounter#register(InjectionListener)
7799 registering injection listeners}, and {@linkplain TypeEncounter#bindInterceptor(
7800 com.google.inject.matcher.Matcher, org.aopalliance.intercept.MethodInterceptor[])
7801 binding method interceptors}.
7802
7803 @since 2.0]]>
7804 </doc>
7805 </interface>
7806 <!-- end interface com.google.inject.spi.TypeListener -->
7807 <!-- start class com.google.inject.spi.TypeListenerBinding -->
7808 <class name="TypeListenerBinding" extends="java.lang.Object"
7809 abstract="false"
7810 static="false" final="true" visibility="public"
7811 deprecated="not deprecated">
7812 <implements name="com.google.inject.spi.Element"/>
7813 <method name="getListener" return="com.google.inject.spi.TypeListener"
7814 abstract="false" native="false" synchronized="false"
7815 static="false" final="false" visibility="public"
7816 deprecated="not deprecated">
7817 <doc>
7818 <![CDATA[Returns the registered listener.]]>
7819 </doc>
7820 </method>
7821 <method name="getTypeMatcher" return="com.google.inject.matcher.Matcher&lt;? super com.google.inject.TypeLiteral&lt;?&gt;&gt;"
7822 abstract="false" native="false" synchronized="false"
7823 static="false" final="false" visibility="public"
7824 deprecated="not deprecated">
7825 <doc>
7826 <![CDATA[Returns the type matcher which chooses which types the listener should be notified of.]]>
7827 </doc>
7828 </method>
7829 <method name="getSource" return="java.lang.Object"
7830 abstract="false" native="false" synchronized="false"
7831 static="false" final="false" visibility="public"
7832 deprecated="not deprecated">
7833 </method>
7834 <method name="acceptVisitor" return="T"
7835 abstract="false" native="false" synchronized="false"
7836 static="false" final="false" visibility="public"
7837 deprecated="not deprecated">
7838 <param name="visitor" type="com.google.inject.spi.ElementVisitor&lt;T&gt;"/>
7839 </method>
7840 <method name="applyTo"
7841 abstract="false" native="false" synchronized="false"
7842 static="false" final="false" visibility="public"
7843 deprecated="not deprecated">
7844 <param name="binder" type="com.google.inject.Binder"/>
7845 </method>
7846 <doc>
7847 <![CDATA[Binds types (picked using a Matcher) to an type listener. Registrations are created explicitly in
7848 a module using {@link com.google.inject.Binder#bindListener(Matcher, TypeListener)} statements:
7849
7850 <pre>
7851 register(only(new TypeLiteral&lt;PaymentService&lt;CreditCard>>() {}), listener);</pre>
7852
7853 @author jessewilson@google.com (Jesse Wilson)
7854 @since 2.0]]>
7855 </doc>
7856 </class>
7857 <!-- end class com.google.inject.spi.TypeListenerBinding -->
7858 <!-- start interface com.google.inject.spi.UntargettedBinding -->
7859 <interface name="UntargettedBinding" abstract="true"
7860 static="false" final="false" visibility="public"
7861 deprecated="not deprecated">
7862 <implements name="com.google.inject.Binding&lt;T&gt;"/>
7863 <doc>
7864 <![CDATA[An untargetted binding. This binding indicates that the injector should use its implicit binding
7865 strategies to resolve injections.
7866
7867 @author jessewilson@google.com (Jesse Wilson)
7868 @since 2.0]]>
7869 </doc>
7870 </interface>
7871 <!-- end interface com.google.inject.spi.UntargettedBinding -->
7872</package>
7873<package name="com.google.inject.spring">
7874 <!-- start class com.google.inject.spring.SpringIntegration -->
7875 <class name="SpringIntegration" extends="java.lang.Object"
7876 abstract="false"
7877 static="false" final="false" visibility="public"
7878 deprecated="not deprecated">
7879 <method name="fromSpring" return="com.google.inject.Provider&lt;T&gt;"
7880 abstract="false" native="false" synchronized="false"
7881 static="true" final="false" visibility="public"
7882 deprecated="not deprecated">
7883 <param name="type" type="java.lang.Class&lt;T&gt;"/>
7884 <param name="name" type="java.lang.String"/>
7885 <doc>
7886 <![CDATA[Creates a provider which looks up objects from Spring using the given name.
7887 Expects a binding to {@link
7888 org.springframework.beans.factory.BeanFactory}. Example usage:
7889
7890 <pre>
7891 bind(DataSource.class)
7892 .toProvider(fromSpring(DataSource.class, "dataSource"));
7893 </pre>]]>
7894 </doc>
7895 </method>
7896 <method name="bindAll"
7897 abstract="false" native="false" synchronized="false"
7898 static="true" final="false" visibility="public"
7899 deprecated="not deprecated">
7900 <param name="binder" type="com.google.inject.Binder"/>
7901 <param name="beanFactory" type="ListableBeanFactory"/>
7902 <doc>
7903 <![CDATA[Binds all Spring beans from the given factory by name. For a Spring bean
7904 named "foo", this method creates a binding to the bean's type and
7905 {@code @Named("foo")}.
7906
7907 @see com.google.inject.name.Named
7908 @see com.google.inject.name.Names#named(String)]]>
7909 </doc>
7910 </method>
7911 <doc>
7912 <![CDATA[Integrates Guice with Spring.
7913
7914 @author crazybob@google.com (Bob Lee)]]>
7915 </doc>
7916 </class>
7917 <!-- end class com.google.inject.spring.SpringIntegration -->
7918</package>
7919<package name="com.google.inject.struts2">
7920 <!-- start class com.google.inject.struts2.GuiceObjectFactory -->
7921 <class name="GuiceObjectFactory" extends="ObjectFactory"
7922 abstract="false"
7923 static="false" final="false" visibility="public"
7924 deprecated="Use {@link com.google.inject.servlet.Struts2Factory} instead.">
7925 <constructor name="GuiceObjectFactory"
7926 static="false" final="false" visibility="public"
7927 deprecated="not deprecated">
7928 </constructor>
7929 <method name="isNoArgConstructorRequired" return="boolean"
7930 abstract="false" native="false" synchronized="false"
7931 static="false" final="false" visibility="public"
7932 deprecated="not deprecated">
7933 </method>
7934 <method name="getClassInstance" return="java.lang.Class"
7935 abstract="false" native="false" synchronized="false"
7936 static="false" final="false" visibility="public"
7937 deprecated="not deprecated">
7938 <param name="name" type="java.lang.String"/>
7939 <exception name="ClassNotFoundException" type="java.lang.ClassNotFoundException"/>
7940 </method>
7941 <method name="buildBean" return="java.lang.Object"
7942 abstract="false" native="false" synchronized="false"
7943 static="false" final="false" visibility="public"
7944 deprecated="not deprecated">
7945 <param name="clazz" type="java.lang.Class"/>
7946 <param name="extraContext" type="java.util.Map"/>
7947 </method>
7948 <method name="buildInterceptor" return="Interceptor"
7949 abstract="false" native="false" synchronized="false"
7950 static="false" final="false" visibility="public"
7951 deprecated="not deprecated">
7952 <param name="interceptorConfig" type="InterceptorConfig"/>
7953 <param name="interceptorRefParams" type="java.util.Map"/>
7954 <exception name="ConfigurationException" type="ConfigurationException"/>
7955 </method>
7956 <doc>
7957 <![CDATA[@deprecated Use {@link com.google.inject.servlet.Struts2Factory} instead.]]>
7958 </doc>
7959 </class>
7960 <!-- end class com.google.inject.struts2.GuiceObjectFactory -->
7961</package>
7962<package name="com.google.inject.throwingproviders">
7963 <!-- start interface com.google.inject.throwingproviders.ThrowingProvider -->
7964 <interface name="ThrowingProvider" abstract="true"
7965 static="false" final="false" visibility="public"
7966 deprecated="not deprecated">
7967 <method name="get" return="T"
7968 abstract="false" native="false" synchronized="false"
7969 static="false" final="false" visibility="public"
7970 deprecated="not deprecated">
7971 <exception name="Exception" type="java.lang.Exception"/>
7972 </method>
7973 <doc>
7974 <![CDATA[Alternative to the Guice {@link com.google.inject.Provider} that throws
7975 a checked Exception. Users may not inject {@code T} directly.
7976
7977 <p>This interface must be extended to use application-specific exception types.
7978 Such subinterfaces may not define new methods:
7979 <pre>
7980 public interface RemoteProvider&lt;T&gt; extends ThrowingProvider&lt;T, RemoteException&gt; { }
7981 </pre>
7982
7983 <p>When this type is bound using {@link ThrowingProviderBinder}, the value returned
7984 or exception thrown by {@link #get} will be scoped. As a consequence, {@link #get}
7985 will invoked at most once within each scope.
7986
7987 @author jmourits@google.com (Jerome Mourits)
7988 @author jessewilson@google.com (Jesse Wilson)]]>
7989 </doc>
7990 </interface>
7991 <!-- end interface com.google.inject.throwingproviders.ThrowingProvider -->
7992 <!-- start class com.google.inject.throwingproviders.ThrowingProviderBinder -->
7993 <class name="ThrowingProviderBinder" extends="java.lang.Object"
7994 abstract="false"
7995 static="false" final="false" visibility="public"
7996 deprecated="not deprecated">
7997 <method name="create" return="com.google.inject.throwingproviders.ThrowingProviderBinder"
7998 abstract="false" native="false" synchronized="false"
7999 static="true" final="false" visibility="public"
8000 deprecated="not deprecated">
8001 <param name="binder" type="com.google.inject.Binder"/>
8002 </method>
8003 <method name="install"
8004 abstract="false" native="false" synchronized="false"
8005 static="true" final="false" visibility="public"
8006 deprecated="not deprecated">
8007 <param name="module" type="com.google.inject.Module"/>
8008 <param name="binder" type="com.google.inject.Binder"/>
8009 <doc>
8010 <![CDATA[Installs {@literal @}{@link ThrowingProvides} methods.
8011
8012 @since 3.0]]>
8013 </doc>
8014 </method>
8015 <method name="bind" return="com.google.inject.throwingproviders.ThrowingProviderBinder.SecondaryBinder&lt;P&gt;"
8016 abstract="false" native="false" synchronized="false"
8017 static="false" final="false" visibility="public"
8018 deprecated="not deprecated">
8019 <param name="interfaceType" type="java.lang.Class&lt;P&gt;"/>
8020 <param name="valueType" type="java.lang.reflect.Type"/>
8021 </method>
8022 <doc>
8023 <![CDATA[<p>Builds a binding for a {@link ThrowingProvider}.
8024
8025 <p>You can use a fluent API and custom providers:
8026 <pre><code>ThrowingProviderBinder.create(binder())
8027 .bind(RemoteProvider.class, Customer.class)
8028 .to(RemoteCustomerProvider.class)
8029 .in(RequestScope.class);
8030 </code></pre>
8031 or, you can use throwing provider methods:
8032 <pre><code>class MyModule extends AbstractModule {
8033 configure() {
8034 ThrowingProviderBinder.install(this, binder());
8035 }
8036
8037 {@literal @}ThrowingProvides(RemoteProvider.class)
8038 {@literal @}RequestScope
8039 Customer provideCustomer(FlakyCustomerCreator creator) throws RemoteException {
8040 return creator.getCustomerOrThrow();
8041 }
8042 }
8043 </code></pre>
8044
8045 @author jmourits@google.com (Jerome Mourits)
8046 @author jessewilson@google.com (Jesse Wilson)]]>
8047 </doc>
8048 </class>
8049 <!-- end class com.google.inject.throwingproviders.ThrowingProviderBinder -->
8050 <!-- start class com.google.inject.throwingproviders.ThrowingProviderBinder.SecondaryBinder -->
8051 <class name="ThrowingProviderBinder.SecondaryBinder" extends="java.lang.Object"
8052 abstract="false"
8053 static="false" final="false" visibility="public"
8054 deprecated="not deprecated">
8055 <constructor name="ThrowingProviderBinder.SecondaryBinder" type="java.lang.Class&lt;P&gt;, java.lang.reflect.Type"
8056 static="false" final="false" visibility="public"
8057 deprecated="not deprecated">
8058 </constructor>
8059 <method name="annotatedWith" return="com.google.inject.throwingproviders.ThrowingProviderBinder.SecondaryBinder&lt;P&gt;"
8060 abstract="false" native="false" synchronized="false"
8061 static="false" final="false" visibility="public"
8062 deprecated="not deprecated">
8063 <param name="annotationType" type="java.lang.Class&lt;? extends java.lang.annotation.Annotation&gt;"/>
8064 </method>
8065 <method name="annotatedWith" return="com.google.inject.throwingproviders.ThrowingProviderBinder.SecondaryBinder&lt;P&gt;"
8066 abstract="false" native="false" synchronized="false"
8067 static="false" final="false" visibility="public"
8068 deprecated="not deprecated">
8069 <param name="annotation" type="java.lang.annotation.Annotation"/>
8070 </method>
8071 <method name="to" return="com.google.inject.binder.ScopedBindingBuilder"
8072 abstract="false" native="false" synchronized="false"
8073 static="false" final="false" visibility="public"
8074 deprecated="not deprecated">
8075 <param name="target" type="P extends com.google.inject.throwingproviders.ThrowingProvider"/>
8076 </method>
8077 <method name="to" return="com.google.inject.binder.ScopedBindingBuilder"
8078 abstract="false" native="false" synchronized="false"
8079 static="false" final="false" visibility="public"
8080 deprecated="not deprecated">
8081 <param name="targetType" type="java.lang.Class&lt;? extends P&gt;"/>
8082 </method>
8083 <method name="to" return="com.google.inject.binder.ScopedBindingBuilder"
8084 abstract="false" native="false" synchronized="false"
8085 static="false" final="false" visibility="public"
8086 deprecated="not deprecated">
8087 <param name="targetKey" type="com.google.inject.Key&lt;? extends P&gt;"/>
8088 </method>
8089 </class>
8090 <!-- end class com.google.inject.throwingproviders.ThrowingProviderBinder.SecondaryBinder -->
8091 <!-- start class com.google.inject.throwingproviders.ThrowingProvides -->
8092 <class name="ThrowingProvides" abstract="true"
8093 static="false" final="false" visibility="public"
8094 deprecated="not deprecated">
8095 <implements name="java.lang.annotation.Annotation"/>
8096 <doc>
8097 <![CDATA[Annotates methods of a {@link Module} to create a provider method binding that can throw
8098 exceptions. The method's return type is bound to it's returned value. Guice will pass
8099 dependencies to the method as parameters.
8100
8101 @author sameb@google.com (Sam Berlin)
8102 @since 3.0]]>
8103 </doc>
8104 </class>
8105 <!-- end class com.google.inject.throwingproviders.ThrowingProvides -->
8106</package>
8107<package name="com.google.inject.tools.jmx">
8108 <!-- start interface com.google.inject.tools.jmx.ManagedBindingMBean -->
8109 <interface name="ManagedBindingMBean" abstract="true"
8110 static="false" final="false" visibility="public"
8111 deprecated="not deprecated">
8112 <method name="getSource" return="java.lang.String"
8113 abstract="false" native="false" synchronized="false"
8114 static="false" final="false" visibility="public"
8115 deprecated="not deprecated">
8116 <doc>
8117 <![CDATA[Gets the source of this binding.]]>
8118 </doc>
8119 </method>
8120 <method name="getProvider" return="java.lang.String"
8121 abstract="false" native="false" synchronized="false"
8122 static="false" final="false" visibility="public"
8123 deprecated="not deprecated">
8124 <doc>
8125 <![CDATA[Gets the provider to which this binding is bound.]]>
8126 </doc>
8127 </method>
8128 <method name="getKey" return="java.lang.String"
8129 abstract="false" native="false" synchronized="false"
8130 static="false" final="false" visibility="public"
8131 deprecated="not deprecated">
8132 <doc>
8133 <![CDATA[Gets the binding key.]]>
8134 </doc>
8135 </method>
8136 <doc>
8137 <![CDATA[JMX interface to bindings.
8138
8139 @author crazybob@google.com (Bob Lee)]]>
8140 </doc>
8141 </interface>
8142 <!-- end interface com.google.inject.tools.jmx.ManagedBindingMBean -->
8143 <!-- start class com.google.inject.tools.jmx.Manager -->
8144 <class name="Manager" extends="java.lang.Object"
8145 abstract="false"
8146 static="false" final="false" visibility="public"
8147 deprecated="not deprecated">
8148 <constructor name="Manager"
8149 static="false" final="false" visibility="public"
8150 deprecated="not deprecated">
8151 </constructor>
8152 <method name="manage"
8153 abstract="false" native="false" synchronized="false"
8154 static="true" final="false" visibility="public"
8155 deprecated="not deprecated">
8156 <param name="domain" type="java.lang.String"/>
8157 <param name="injector" type="com.google.inject.Injector"/>
8158 <doc>
8159 <![CDATA[Registers all the bindings of an Injector with the platform MBean server.
8160 Consider using the name of your root {@link Module} class as the domain.]]>
8161 </doc>
8162 </method>
8163 <method name="manage"
8164 abstract="false" native="false" synchronized="false"
8165 static="true" final="false" visibility="public"
8166 deprecated="not deprecated">
8167 <param name="server" type="javax.management.MBeanServer"/>
8168 <param name="domain" type="java.lang.String"/>
8169 <param name="injector" type="com.google.inject.Injector"/>
8170 <doc>
8171 <![CDATA[Registers all the bindings of an Injector with the given MBean server.
8172 Consider using the name of your root {@link Module} class as the domain.]]>
8173 </doc>
8174 </method>
8175 <method name="main"
8176 abstract="false" native="false" synchronized="false"
8177 static="true" final="false" visibility="public"
8178 deprecated="not deprecated">
8179 <param name="args" type="java.lang.String[]"/>
8180 <exception name="Exception" type="java.lang.Exception"/>
8181 <doc>
8182 <![CDATA[Run with no arguments for usage instructions.]]>
8183 </doc>
8184 </method>
8185 <doc>
8186 <![CDATA[Provides a JMX interface to Guice.
8187
8188 @author crazybob@google.com (Bob Lee)]]>
8189 </doc>
8190 </class>
8191 <!-- end class com.google.inject.tools.jmx.Manager -->
8192</package>
8193<package name="com.google.inject.util">
8194 <!-- start class com.google.inject.util.Jsr330 -->
8195 <class name="Jsr330" extends="java.lang.Object"
8196 abstract="false"
8197 static="false" final="false" visibility="public"
8198 deprecated="not deprecated">
8199 <method name="guicify" return="com.google.inject.Provider&lt;T&gt;"
8200 abstract="false" native="false" synchronized="false"
8201 static="true" final="false" visibility="public"
8202 deprecated="not deprecated">
8203 <param name="provider" type="javax.inject.Provider&lt;T&gt;"/>
8204 <doc>
8205 <![CDATA[Returns a Guice-friendly {@code com.google.inject.Provider} for the given
8206 JSR-330 {@code javax.inject.Provider}. The converse method is unnecessary,
8207 since Guice providers directly implement the JSR-330 interface.]]>
8208 </doc>
8209 </method>
8210 <doc>
8211 <![CDATA[Utility methods for use with <a href="http://code.google.com/p/atinject/">JSR
8212 330</a>.
8213
8214 @author jessewilson@google.com (Jesse Wilson)
8215 @since 3.0]]>
8216 </doc>
8217 </class>
8218 <!-- end class com.google.inject.util.Jsr330 -->
8219 <!-- start class com.google.inject.util.Modules -->
8220 <class name="Modules" extends="java.lang.Object"
8221 abstract="false"
8222 static="false" final="true" visibility="public"
8223 deprecated="not deprecated">
8224 <method name="override" return="com.google.inject.util.Modules.OverriddenModuleBuilder"
8225 abstract="false" native="false" synchronized="false"
8226 static="true" final="false" visibility="public"
8227 deprecated="not deprecated">
8228 <param name="modules" type="com.google.inject.Module[]"/>
8229 <doc>
8230 <![CDATA[Returns a builder that creates a module that overlays override modules over the given
8231 modules. If a key is bound in both sets of modules, only the binding from the override modules
8232 is kept. If a single {@link PrivateModule} is supplied or all elements are from
8233 a single {@link PrivateBinder}, then this will overwrite the private bindings.
8234 Otherwise, private bindings will not be overwritten unless they are exposed.
8235 This can be used to replace the bindings of a production module with test bindings:
8236 <pre>
8237 Module functionalTestModule
8238 = Modules.override(new ProductionModule()).with(new TestModule());
8239 </pre>
8240
8241 <p>Prefer to write smaller modules that can be reused and tested without overrides.
8242
8243 @param modules the modules whose bindings are open to be overridden]]>
8244 </doc>
8245 </method>
8246 <method name="override" return="com.google.inject.util.Modules.OverriddenModuleBuilder"
8247 abstract="false" native="false" synchronized="false"
8248 static="true" final="false" visibility="public"
8249 deprecated="not deprecated">
8250 <param name="modules" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
8251 <doc>
8252 <![CDATA[Returns a builder that creates a module that overlays override modules over the given
8253 modules. If a key is bound in both sets of modules, only the binding from the override modules
8254 is kept. If a single {@link PrivateModule} is supplied or all elements are from
8255 a single {@link PrivateBinder}, then this will overwrite the private bindings.
8256 Otherwise, private bindings will not be overwritten unless they are exposed.
8257 This can be used to replace the bindings of a production module with test bindings:
8258 <pre>
8259 Module functionalTestModule
8260 = Modules.override(getProductionModules()).with(getTestModules());
8261 </pre>
8262
8263 <p>Prefer to write smaller modules that can be reused and tested without overrides.
8264
8265 @param modules the modules whose bindings are open to be overridden]]>
8266 </doc>
8267 </method>
8268 <method name="combine" return="com.google.inject.Module"
8269 abstract="false" native="false" synchronized="false"
8270 static="true" final="false" visibility="public"
8271 deprecated="not deprecated">
8272 <param name="modules" type="com.google.inject.Module[]"/>
8273 <doc>
8274 <![CDATA[Returns a new module that installs all of {@code modules}.]]>
8275 </doc>
8276 </method>
8277 <method name="combine" return="com.google.inject.Module"
8278 abstract="false" native="false" synchronized="false"
8279 static="true" final="false" visibility="public"
8280 deprecated="not deprecated">
8281 <param name="modules" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
8282 <doc>
8283 <![CDATA[Returns a new module that installs all of {@code modules}.]]>
8284 </doc>
8285 </method>
8286 <field name="EMPTY_MODULE" type="com.google.inject.Module"
8287 transient="false" volatile="false"
8288 static="true" final="true" visibility="public"
8289 deprecated="not deprecated">
8290 </field>
8291 <doc>
8292 <![CDATA[Static utility methods for creating and working with instances of {@link Module}.
8293
8294 @author jessewilson@google.com (Jesse Wilson)
8295 @since 2.0]]>
8296 </doc>
8297 </class>
8298 <!-- end class com.google.inject.util.Modules -->
8299 <!-- start interface com.google.inject.util.Modules.OverriddenModuleBuilder -->
8300 <interface name="Modules.OverriddenModuleBuilder" abstract="true"
8301 static="true" final="false" visibility="public"
8302 deprecated="not deprecated">
8303 <method name="with" return="com.google.inject.Module"
8304 abstract="false" native="false" synchronized="false"
8305 static="false" final="false" visibility="public"
8306 deprecated="not deprecated">
8307 <param name="overrides" type="com.google.inject.Module[]"/>
8308 <doc>
8309 <![CDATA[See the EDSL example at {@link Modules#override(Module[]) override()}.]]>
8310 </doc>
8311 </method>
8312 <method name="with" return="com.google.inject.Module"
8313 abstract="false" native="false" synchronized="false"
8314 static="false" final="false" visibility="public"
8315 deprecated="not deprecated">
8316 <param name="overrides" type="java.lang.Iterable&lt;? extends com.google.inject.Module&gt;"/>
8317 <doc>
8318 <![CDATA[See the EDSL example at {@link Modules#override(Module[]) override()}.]]>
8319 </doc>
8320 </method>
8321 <doc>
8322 <![CDATA[See the EDSL example at {@link Modules#override(Module[]) override()}.]]>
8323 </doc>
8324 </interface>
8325 <!-- end interface com.google.inject.util.Modules.OverriddenModuleBuilder -->
8326 <!-- start class com.google.inject.util.Providers -->
8327 <class name="Providers" extends="java.lang.Object"
8328 abstract="false"
8329 static="false" final="true" visibility="public"
8330 deprecated="not deprecated">
8331 <method name="of" return="com.google.inject.Provider&lt;T&gt;"
8332 abstract="false" native="false" synchronized="false"
8333 static="true" final="false" visibility="public"
8334 deprecated="not deprecated">
8335 <param name="instance" type="T"/>
8336 <doc>
8337 <![CDATA[Returns a provider which always provides {@code instance}. This should not
8338 be necessary to use in your application, but is helpful for several types
8339 of unit tests.
8340
8341 @param instance the instance that should always be provided. This is also
8342 permitted to be null, to enable aggressive testing, although in real
8343 life a Guice-supplied Provider will never return null.]]>
8344 </doc>
8345 </method>
8346 <doc>
8347 <![CDATA[Static utility methods for creating and working with instances of
8348 {@link Provider}.
8349
8350 @author Kevin Bourrillion (kevinb9n@gmail.com)
8351 @since 2.0]]>
8352 </doc>
8353 </class>
8354 <!-- end class com.google.inject.util.Providers -->
8355 <!-- start class com.google.inject.util.Types -->
8356 <class name="Types" extends="java.lang.Object"
8357 abstract="false"
8358 static="false" final="true" visibility="public"
8359 deprecated="not deprecated">
8360 <method name="newParameterizedType" return="java.lang.reflect.ParameterizedType"
8361 abstract="false" native="false" synchronized="false"
8362 static="true" final="false" visibility="public"
8363 deprecated="not deprecated">
8364 <param name="rawType" type="java.lang.reflect.Type"/>
8365 <param name="typeArguments" type="java.lang.reflect.Type[]"/>
8366 <doc>
8367 <![CDATA[Returns a new parameterized type, applying {@code typeArguments} to
8368 {@code rawType}. The returned type does not have an owner type.
8369
8370 @return a {@link java.io.Serializable serializable} parameterized type.]]>
8371 </doc>
8372 </method>
8373 <method name="newParameterizedTypeWithOwner" return="java.lang.reflect.ParameterizedType"
8374 abstract="false" native="false" synchronized="false"
8375 static="true" final="false" visibility="public"
8376 deprecated="not deprecated">
8377 <param name="ownerType" type="java.lang.reflect.Type"/>
8378 <param name="rawType" type="java.lang.reflect.Type"/>
8379 <param name="typeArguments" type="java.lang.reflect.Type[]"/>
8380 <doc>
8381 <![CDATA[Returns a new parameterized type, applying {@code typeArguments} to
8382 {@code rawType} and enclosed by {@code ownerType}.
8383
8384 @return a {@link java.io.Serializable serializable} parameterized type.]]>
8385 </doc>
8386 </method>
8387 <method name="arrayOf" return="java.lang.reflect.GenericArrayType"
8388 abstract="false" native="false" synchronized="false"
8389 static="true" final="false" visibility="public"
8390 deprecated="not deprecated">
8391 <param name="componentType" type="java.lang.reflect.Type"/>
8392 <doc>
8393 <![CDATA[Returns an array type whose elements are all instances of
8394 {@code componentType}.
8395
8396 @return a {@link java.io.Serializable serializable} generic array type.]]>
8397 </doc>
8398 </method>
8399 <method name="subtypeOf" return="java.lang.reflect.WildcardType"
8400 abstract="false" native="false" synchronized="false"
8401 static="true" final="false" visibility="public"
8402 deprecated="not deprecated">
8403 <param name="bound" type="java.lang.reflect.Type"/>
8404 <doc>
8405 <![CDATA[Returns a type that represents an unknown type that extends {@code bound}.
8406 For example, if {@code bound} is {@code CharSequence.class}, this returns
8407 {@code ? extends CharSequence}. If {@code bound} is {@code Object.class},
8408 this returns {@code ?}, which is shorthand for {@code ? extends Object}.]]>
8409 </doc>
8410 </method>
8411 <method name="supertypeOf" return="java.lang.reflect.WildcardType"
8412 abstract="false" native="false" synchronized="false"
8413 static="true" final="false" visibility="public"
8414 deprecated="not deprecated">
8415 <param name="bound" type="java.lang.reflect.Type"/>
8416 <doc>
8417 <![CDATA[Returns a type that represents an unknown supertype of {@code bound}. For
8418 example, if {@code bound} is {@code String.class}, this returns {@code ?
8419 super String}.]]>
8420 </doc>
8421 </method>
8422 <method name="listOf" return="java.lang.reflect.ParameterizedType"
8423 abstract="false" native="false" synchronized="false"
8424 static="true" final="false" visibility="public"
8425 deprecated="not deprecated">
8426 <param name="elementType" type="java.lang.reflect.Type"/>
8427 <doc>
8428 <![CDATA[Returns a type modelling a {@link List} whose elements are of type
8429 {@code elementType}.
8430
8431 @return a {@link java.io.Serializable serializable} parameterized type.]]>
8432 </doc>
8433 </method>
8434 <method name="setOf" return="java.lang.reflect.ParameterizedType"
8435 abstract="false" native="false" synchronized="false"
8436 static="true" final="false" visibility="public"
8437 deprecated="not deprecated">
8438 <param name="elementType" type="java.lang.reflect.Type"/>
8439 <doc>
8440 <![CDATA[Returns a type modelling a {@link Set} whose elements are of type
8441 {@code elementType}.
8442
8443 @return a {@link java.io.Serializable serializable} parameterized type.]]>
8444 </doc>
8445 </method>
8446 <method name="mapOf" return="java.lang.reflect.ParameterizedType"
8447 abstract="false" native="false" synchronized="false"
8448 static="true" final="false" visibility="public"
8449 deprecated="not deprecated">
8450 <param name="keyType" type="java.lang.reflect.Type"/>
8451 <param name="valueType" type="java.lang.reflect.Type"/>
8452 <doc>
8453 <![CDATA[Returns a type modelling a {@link Map} whose keys are of type
8454 {@code keyType} and whose values are of type {@code valueType}.
8455
8456 @return a {@link java.io.Serializable serializable} parameterized type.]]>
8457 </doc>
8458 </method>
8459 <method name="providerOf" return="java.lang.reflect.ParameterizedType"
8460 abstract="false" native="false" synchronized="false"
8461 static="true" final="false" visibility="public"
8462 deprecated="not deprecated">
8463 <param name="providedType" type="java.lang.reflect.Type"/>
8464 <doc>
8465 <![CDATA[Returns a type modelling a {@link Provider} that provides elements of type
8466 {@code elementType}.
8467
8468 @return a {@link java.io.Serializable serializable} parameterized type.]]>
8469 </doc>
8470 </method>
8471 <doc>
8472 <![CDATA[Static methods for working with types.
8473
8474 @author crazybob@google.com (Bob Lee)
8475 @since 2.0]]>
8476 </doc>
8477 </class>
8478 <!-- end class com.google.inject.util.Types -->
8479</package>
8480
8481</api>