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