File: Binder.html

package info (click to toggle)
sisu-guice 3.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 56,688 kB
  • sloc: xml: 51,933; java: 42,878; sh: 121; jsp: 12; makefile: 5
file content (976 lines) | stat: -rw-r--r-- 53,466 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_07) on Tue May 19 17:01:44 PDT 2009 -->
<TITLE>
Binder (Guice 2.0)
</TITLE>

<META NAME="date" CONTENT="2009-05-19">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="Binder (Guice 2.0)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Binder.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/google/inject/AbstractModule.html" title="class in com.google.inject"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/google/inject/Binding.html" title="interface in com.google.inject"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?com/google/inject/Binder.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Binder.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.google.inject</FONT>
<BR>
Interface Binder</H2>
<DL>
<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../com/google/inject/PrivateBinder.html" title="interface in com.google.inject">PrivateBinder</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>Binder</B></DL>
</PRE>

<P>
Collects configuration information (primarily <i>bindings</i>) which will be
 used to create an <A HREF="../../../com/google/inject/Injector.html" title="interface in com.google.inject"><CODE>Injector</CODE></A>. Guice provides this object to your
 application's <A HREF="../../../com/google/inject/Module.html" title="interface in com.google.inject"><CODE>Module</CODE></A> implementors so they may each contribute
 their own bindings and other registrations.

 <h3>The Guice Binding EDSL</h3>

 Guice uses an <i>embedded domain-specific language</i>, or EDSL, to help you
 create bindings simply and readably.  This approach is great for overall
 usability, but it does come with a small cost: <b>it is difficult to
 learn how to use the Binding EDSL by reading
 method-level javadocs</b>.  Instead, you should consult the series of
 examples below.  To save space, these examples omit the opening
 <code>binder</code>, just as you will if your module extends
 <A HREF="../../../com/google/inject/AbstractModule.html" title="class in com.google.inject"><CODE>AbstractModule</CODE></A>.

 <pre>
     bind(ServiceImpl.class);</pre>

 This statement does essentially nothing; it "binds the <code>ServiceImpl</code>
 class to itself" and does not change Guice's default behavior.  You may still
 want to use this if you prefer your <A HREF="../../../com/google/inject/Module.html" title="interface in com.google.inject"><CODE>Module</CODE></A> class to serve as an
 explicit <i>manifest</i> for the services it provides.  Also, in rare cases,
 Guice may be unable to validate a binding at injector creation time unless it
 is given explicitly.

 <pre>
     bind(Service.class).to(ServiceImpl.class);</pre>

 Specifies that a request for a <code>Service</code> instance with no binding
 annotations should be treated as if it were a request for a
 <code>ServiceImpl</code> instance. This <i>overrides</i> the function of any
 <A HREF="../../../com/google/inject/ImplementedBy.html" title="annotation in com.google.inject"><CODE>@ImplementedBy</CODE></A> or <A HREF="../../../com/google/inject/ProvidedBy.html" title="annotation in com.google.inject"><CODE>@ProvidedBy</CODE></A>
 annotations found on <code>Service</code>, since Guice will have already
 "moved on" to <code>ServiceImpl</code> before it reaches the point when it starts
 looking for these annotations.

 <pre>
     bind(Service.class).toProvider(ServiceProvider.class);</pre>

 In this example, <code>ServiceProvider</code> must extend or implement
 <code>Provider&lt;Service&gt;</code>. This binding specifies that Guice should resolve
 an unannotated injection request for <code>Service</code> by first resolving an
 instance of <code>ServiceProvider</code> in the regular way, then calling
 <A HREF="../../../com/google/inject/Provider.html#get()"><CODE>get()</CODE></A> on the resulting Provider instance to obtain the
 <code>Service</code> instance.

 <p>The <A HREF="../../../com/google/inject/Provider.html" title="interface in com.google.inject"><CODE>Provider</CODE></A> you use here does not have to be a "factory"; that
 is, a provider which always <i>creates</i> each instance it provides.
 However, this is generally a good practice to follow.  You can then use
 Guice's concept of <A HREF="../../../com/google/inject/Scope.html" title="interface in com.google.inject"><CODE>scopes</CODE></A> to guide when creation should happen
 -- "letting Guice work for you".

 <pre>
     bind(Service.class).annotatedWith(Red.class).to(ServiceImpl.class);</pre>

 Like the previous example, but only applies to injection requests that use
 the binding annotation <code>@Red</code>.  If your module also includes bindings
 for particular <i>values</i> of the <code>@Red</code> annotation (see below),
 then this binding will serve as a "catch-all" for any values of <code>@Red</code>
 that have no exact match in the bindings.
 
 <pre>
     bind(ServiceImpl.class).in(Singleton.class);
     // or, alternatively
     bind(ServiceImpl.class).in(Scopes.SINGLETON);</pre>

 Either of these statements places the <code>ServiceImpl</code> class into
 singleton scope.  Guice will create only one instance of <code>ServiceImpl</code>
 and will reuse it for all injection requests of this type.  Note that it is
 still possible to bind another instance of <code>ServiceImpl</code> if the second
 binding is qualified by an annotation as in the previous example.  Guice is
 not overly concerned with <i>preventing</i> you from creating multiple
 instances of your "singletons", only with <i>enabling</i> your application to
 share only one instance if that's all you tell Guice you need.

 <p><b>Note:</b> a scope specified in this way <i>overrides</i> any scope that
 was specified with an annotation on the <code>ServiceImpl</code> class.
 
 <p>Besides <A HREF="../../../com/google/inject/Singleton.html" title="annotation in com.google.inject"><CODE>Singleton</CODE></A>/<A HREF="../../../com/google/inject/Scopes.html#SINGLETON"><CODE>Scopes.SINGLETON</CODE></A>, there are
 servlet-specific scopes available in
 <code>com.google.inject.servlet.ServletScopes</code>, and your Modules can
 contribute their own custom scopes for use here as well.

 <pre>
     bind(new TypeLiteral&lt;PaymentService&lt;CreditCard>>() {})
         .to(CreditCardPaymentService.class);</pre>

 This admittedly odd construct is the way to bind a parameterized type. It
 tells Guice how to honor an injection request for an element of type
 <code>PaymentService&lt;CreditCard&gt;</code>. The class
 <code>CreditCardPaymentService</code> must implement the
 <code>PaymentService&lt;CreditCard&gt;</code> interface.  Guice cannot currently bind or
 inject a generic type, such as <code>Set&lt;E&gt;</code>; all type parameters must be
 fully specified.

 <pre>
     bind(Service.class).toInstance(new ServiceImpl());
     // or, alternatively
     bind(Service.class).toInstance(SomeLegacyRegistry.getService());</pre>

 In this example, your module itself, <i>not Guice</i>, takes responsibility
 for obtaining a <code>ServiceImpl</code> instance, then asks Guice to always use
 this single instance to fulfill all <code>Service</code> injection requests.  When
 the <A HREF="../../../com/google/inject/Injector.html" title="interface in com.google.inject"><CODE>Injector</CODE></A> is created, it will automatically perform field
 and method injection for this instance, but any injectable constructor on
 <code>ServiceImpl</code> is simply ignored.  Note that using this approach results
 in "eager loading" behavior that you can't control.

 <pre>
     bindConstant().annotatedWith(ServerHost.class).to(args[0]);</pre>

 Sets up a constant binding. Constant injections must always be annotated.
 When a constant binding's value is a string, it is eligile for conversion to
 all primitive types, to <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Enum.html?is-external=true#valueOf(java.lang.Class, java.lang.String)" title="class or interface in java.lang"><CODE>all enums</CODE></A>, and to
 <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true#forName(java.lang.String)" title="class or interface in java.lang"><CODE>class literals</CODE></A>. Conversions for other types can be
 configured using <A HREF="../../../com/google/inject/Binder.html#convertToTypes(com.google.inject.matcher.Matcher, com.google.inject.spi.TypeConverter)"><CODE>convertToTypes()</CODE></A>.

 <pre>
   @Color("red") Color red; // A member variable (field)
    . . .
     red = MyModule.class.getDeclaredField("red").getAnnotation(Color.class);
     bind(Service.class).annotatedWith(red).to(RedService.class);</pre>

 If your binding annotation has parameters you can apply different bindings to
 different specific values of your annotation.  Getting your hands on the
 right instance of the annotation is a bit of a pain -- one approach, shown
 above, is to apply a prototype annotation to a field in your module class, so
 that you can read this annotation instance and give it to Guice.

 <pre>
     bind(Service.class)
         .annotatedWith(Names.named("blue"))
         .to(BlueService.class);</pre>

 Differentiating by names is a common enough use case that we provided a
 standard annotation, <A HREF="../../../com/google/inject/name/Named.html" title="annotation in com.google.inject.name"><CODE>@Named</CODE></A>.  Because of
 Guice's library support, binding by name is quite easier than in the
 arbitrary binding annotation case we just saw.  However, remember that these
 names will live in a single flat namespace with all the other names used in
 your application.

 <p>The above list of examples is far from exhaustive.  If you can think of
 how the concepts of one example might coexist with the concepts from another,
 you can most likely weave the two together.  If the two concepts make no
 sense with each other, you most likely won't be able to do it.  In a few
 cases Guice will let something bogus slip by, and will then inform you of
 the problems at runtime, as soon as you try to create your Injector.

 <p>The other methods of Binder such as <A HREF="../../../com/google/inject/Binder.html#bindScope(java.lang.Class, com.google.inject.Scope)"><CODE>bindScope(java.lang.Class<? extends java.lang.annotation.Annotation>, com.google.inject.Scope)</CODE></A>,
 <A HREF="../../../com/google/inject/Binder.html#bindInterceptor(com.google.inject.matcher.Matcher, com.google.inject.matcher.Matcher, org.aopalliance.intercept.MethodInterceptor...)"><CODE>bindInterceptor(com.google.inject.matcher.Matcher<? super java.lang.Class<?>>, com.google.inject.matcher.Matcher<? super java.lang.reflect.Method>, org.aopalliance.intercept.MethodInterceptor...)</CODE></A>, <A HREF="../../../com/google/inject/Binder.html#install(com.google.inject.Module)"><CODE>install(com.google.inject.Module)</CODE></A>, <A HREF="../../../com/google/inject/Binder.html#requestStaticInjection(java.lang.Class...)"><CODE>requestStaticInjection(java.lang.Class<?>...)</CODE></A>,
 <A HREF="../../../com/google/inject/Binder.html#addError(java.lang.String, java.lang.Object...)"><CODE>addError(java.lang.String, java.lang.Object...)</CODE></A> and <A HREF="../../../com/google/inject/Binder.html#currentStage()"><CODE>currentStage()</CODE></A> are not part of the Binding EDSL;
 you can learn how to use these in the usual way, from the method
 documentation.
<P>

<P>
<HR>

<P>

<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#addError(com.google.inject.spi.Message)">addError</A></B>(<A HREF="../../../com/google/inject/spi/Message.html" title="class in com.google.inject.spi">Message</A>&nbsp;message)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Records an error message to be presented to the user at a later time.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#addError(java.lang.String, java.lang.Object...)">addError</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;message,
         <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>...&nbsp;arguments)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Records an error message which will be presented to the user at a later
 time.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#addError(java.lang.Throwable)">addError</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A>&nbsp;t)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Records an exception, the full details of which will be logged, and the
 message of which will be presented to the user at a later
 time.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;T&gt; <A HREF="../../../com/google/inject/binder/AnnotatedBindingBuilder.html" title="interface in com.google.inject.binder">AnnotatedBindingBuilder</A>&lt;T&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#bind(java.lang.Class)">bind</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See the EDSL examples at <A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject"><CODE>Binder</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;T&gt; <A HREF="../../../com/google/inject/binder/LinkedBindingBuilder.html" title="interface in com.google.inject.binder">LinkedBindingBuilder</A>&lt;T&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#bind(com.google.inject.Key)">bind</A></B>(<A HREF="../../../com/google/inject/Key.html" title="class in com.google.inject">Key</A>&lt;T&gt;&nbsp;key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See the EDSL examples at <A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject"><CODE>Binder</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;T&gt; <A HREF="../../../com/google/inject/binder/AnnotatedBindingBuilder.html" title="interface in com.google.inject.binder">AnnotatedBindingBuilder</A>&lt;T&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#bind(com.google.inject.TypeLiteral)">bind</A></B>(<A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A>&lt;T&gt;&nbsp;typeLiteral)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See the EDSL examples at <A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject"><CODE>Binder</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../com/google/inject/binder/AnnotatedConstantBindingBuilder.html" title="interface in com.google.inject.binder">AnnotatedConstantBindingBuilder</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#bindConstant()">bindConstant</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See the EDSL examples at <A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject"><CODE>Binder</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#bindInterceptor(com.google.inject.matcher.Matcher, com.google.inject.matcher.Matcher, org.aopalliance.intercept.MethodInterceptor...)">bindInterceptor</A></B>(<A HREF="../../../com/google/inject/matcher/Matcher.html" title="interface in com.google.inject.matcher">Matcher</A>&lt;? super <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;&gt;&nbsp;classMatcher,
                <A HREF="../../../com/google/inject/matcher/Matcher.html" title="interface in com.google.inject.matcher">Matcher</A>&lt;? super <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</A>&gt;&nbsp;methodMatcher,
                <A HREF="http://aopalliance.sourceforge.net/doc/org/aopalliance/intercept/MethodInterceptor.html?is-external=true" title="class or interface in org.aopalliance.intercept">MethodInterceptor</A>...&nbsp;interceptors)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binds method interceptor[s] to methods matched by class and method matchers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#bindListener(com.google.inject.matcher.Matcher, com.google.inject.spi.TypeListener)">bindListener</A></B>(<A HREF="../../../com/google/inject/matcher/Matcher.html" title="interface in com.google.inject.matcher">Matcher</A>&lt;? super <A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A>&lt;?&gt;&gt;&nbsp;typeMatcher,
             <A HREF="../../../com/google/inject/spi/TypeListener.html" title="interface in com.google.inject.spi">TypeListener</A>&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Registers a listener for injectable types.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#bindScope(java.lang.Class, com.google.inject.Scope)">bindScope</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</A>&gt;&nbsp;annotationType,
          <A HREF="../../../com/google/inject/Scope.html" title="interface in com.google.inject">Scope</A>&nbsp;scope)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binds a scope to an annotation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#convertToTypes(com.google.inject.matcher.Matcher, com.google.inject.spi.TypeConverter)">convertToTypes</A></B>(<A HREF="../../../com/google/inject/matcher/Matcher.html" title="interface in com.google.inject.matcher">Matcher</A>&lt;? super <A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A>&lt;?&gt;&gt;&nbsp;typeMatcher,
               <A HREF="../../../com/google/inject/spi/TypeConverter.html" title="interface in com.google.inject.spi">TypeConverter</A>&nbsp;converter)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binds a type converter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../com/google/inject/Stage.html" title="enum in com.google.inject">Stage</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#currentStage()">currentStage</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current stage.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;T&gt; <A HREF="../../../com/google/inject/MembersInjector.html" title="interface in com.google.inject">MembersInjector</A>&lt;T&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#getMembersInjector(java.lang.Class)">getMembersInjector</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the members injector used to inject dependencies into methods and fields on instances
 of the given type <code>T</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;T&gt; <A HREF="../../../com/google/inject/MembersInjector.html" title="interface in com.google.inject">MembersInjector</A>&lt;T&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#getMembersInjector(com.google.inject.TypeLiteral)">getMembersInjector</A></B>(<A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A>&lt;T&gt;&nbsp;typeLiteral)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the members injector used to inject dependencies into methods and fields on instances
 of the given type <code>T</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;T&gt; <A HREF="../../../com/google/inject/Provider.html" title="interface in com.google.inject">Provider</A>&lt;T&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#getProvider(java.lang.Class)">getProvider</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;type)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the provider used to obtain instances for the given injection type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;T&gt; <A HREF="../../../com/google/inject/Provider.html" title="interface in com.google.inject">Provider</A>&lt;T&gt;</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#getProvider(com.google.inject.Key)">getProvider</A></B>(<A HREF="../../../com/google/inject/Key.html" title="class in com.google.inject">Key</A>&lt;T&gt;&nbsp;key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the provider used to obtain instances for the given injection key.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#install(com.google.inject.Module)">install</A></B>(<A HREF="../../../com/google/inject/Module.html" title="interface in com.google.inject">Module</A>&nbsp;module)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uses the given module to configure more bindings.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../com/google/inject/PrivateBinder.html" title="interface in com.google.inject">PrivateBinder</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#newPrivateBinder()">newPrivateBinder</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new private child environment for bindings and other configuration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#requestInjection(java.lang.Object)">requestInjection</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;instance)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Upon successful creation, the <A HREF="../../../com/google/inject/Injector.html" title="interface in com.google.inject"><CODE>Injector</CODE></A> will inject instance fields
 and methods of the given object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE>&lt;T&gt; void</CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#requestInjection(com.google.inject.TypeLiteral, T)">requestInjection</A></B>(<A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A>&lt;T&gt;&nbsp;type,
                 T&nbsp;instance)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Upon successful creation, the <A HREF="../../../com/google/inject/Injector.html" title="interface in com.google.inject"><CODE>Injector</CODE></A> will inject instance fields
 and methods of the given object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#requestStaticInjection(java.lang.Class...)">requestStaticInjection</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;...&nbsp;types)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Upon successful creation, the <A HREF="../../../com/google/inject/Injector.html" title="interface in com.google.inject"><CODE>Injector</CODE></A> will inject static fields
 and methods in the given classes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject">Binder</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#skipSources(java.lang.Class...)">skipSources</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>...&nbsp;classesToSkip)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a binder that skips <code>classesToSkip</code> when identify the
 calling code.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject">Binder</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/Binder.html#withSource(java.lang.Object)">withSource</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;source)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a binder that uses <code>source</code> as the reference location for
 configuration errors.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="bindInterceptor(com.google.inject.matcher.Matcher, com.google.inject.matcher.Matcher, org.aopalliance.intercept.MethodInterceptor...)"><!-- --></A><H3>
bindInterceptor</H3>
<PRE>
void <B>bindInterceptor</B>(<A HREF="../../../com/google/inject/matcher/Matcher.html" title="interface in com.google.inject.matcher">Matcher</A>&lt;? super <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;&gt;&nbsp;classMatcher,
                     <A HREF="../../../com/google/inject/matcher/Matcher.html" title="interface in com.google.inject.matcher">Matcher</A>&lt;? super <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</A>&gt;&nbsp;methodMatcher,
                     <A HREF="http://aopalliance.sourceforge.net/doc/org/aopalliance/intercept/MethodInterceptor.html?is-external=true" title="class or interface in org.aopalliance.intercept">MethodInterceptor</A>...&nbsp;interceptors)</PRE>
<DL>
<DD>Binds method interceptor[s] to methods matched by class and method matchers. A method is
 eligible for interception if:

 <ul>
  <li>Guice created the instance the method is on</li>
  <li>Neither the enclosing type nor the method is final</li>
  <li>And the method is package-private, protected, or public</li>
 </ul>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>classMatcher</CODE> - matches classes the interceptor should apply to. For
     example: <code>only(Runnable.class)</code>.<DD><CODE>methodMatcher</CODE> - matches methods the interceptor should apply to. For
     example: <code>annotatedWith(Transactional.class)</code>.<DD><CODE>interceptors</CODE> - to bind</DL>
</DD>
</DL>
<HR>

<A NAME="bindScope(java.lang.Class, com.google.inject.Scope)"><!-- --></A><H3>
bindScope</H3>
<PRE>
void <B>bindScope</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/annotation/Annotation.html?is-external=true" title="class or interface in java.lang.annotation">Annotation</A>&gt;&nbsp;annotationType,
               <A HREF="../../../com/google/inject/Scope.html" title="interface in com.google.inject">Scope</A>&nbsp;scope)</PRE>
<DL>
<DD>Binds a scope to an annotation.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="bind(com.google.inject.Key)"><!-- --></A><H3>
bind</H3>
<PRE>
&lt;T&gt; <A HREF="../../../com/google/inject/binder/LinkedBindingBuilder.html" title="interface in com.google.inject.binder">LinkedBindingBuilder</A>&lt;T&gt; <B>bind</B>(<A HREF="../../../com/google/inject/Key.html" title="class in com.google.inject">Key</A>&lt;T&gt;&nbsp;key)</PRE>
<DL>
<DD>See the EDSL examples at <A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject"><CODE>Binder</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="bind(com.google.inject.TypeLiteral)"><!-- --></A><H3>
bind</H3>
<PRE>
&lt;T&gt; <A HREF="../../../com/google/inject/binder/AnnotatedBindingBuilder.html" title="interface in com.google.inject.binder">AnnotatedBindingBuilder</A>&lt;T&gt; <B>bind</B>(<A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A>&lt;T&gt;&nbsp;typeLiteral)</PRE>
<DL>
<DD>See the EDSL examples at <A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject"><CODE>Binder</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="bind(java.lang.Class)"><!-- --></A><H3>
bind</H3>
<PRE>
&lt;T&gt; <A HREF="../../../com/google/inject/binder/AnnotatedBindingBuilder.html" title="interface in com.google.inject.binder">AnnotatedBindingBuilder</A>&lt;T&gt; <B>bind</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;type)</PRE>
<DL>
<DD>See the EDSL examples at <A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject"><CODE>Binder</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="bindConstant()"><!-- --></A><H3>
bindConstant</H3>
<PRE>
<A HREF="../../../com/google/inject/binder/AnnotatedConstantBindingBuilder.html" title="interface in com.google.inject.binder">AnnotatedConstantBindingBuilder</A> <B>bindConstant</B>()</PRE>
<DL>
<DD>See the EDSL examples at <A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject"><CODE>Binder</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="requestInjection(com.google.inject.TypeLiteral,java.lang.Object)"><!-- --></A><A NAME="requestInjection(com.google.inject.TypeLiteral, T)"><!-- --></A><H3>
requestInjection</H3>
<PRE>
&lt;T&gt; void <B>requestInjection</B>(<A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A>&lt;T&gt;&nbsp;type,
                          T&nbsp;instance)</PRE>
<DL>
<DD>Upon successful creation, the <A HREF="../../../com/google/inject/Injector.html" title="interface in com.google.inject"><CODE>Injector</CODE></A> will inject instance fields
 and methods of the given object.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - of instance<DD><CODE>instance</CODE> - for which members will be injected<DT><B>Since:</B></DT>
  <DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="requestInjection(java.lang.Object)"><!-- --></A><H3>
requestInjection</H3>
<PRE>
void <B>requestInjection</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;instance)</PRE>
<DL>
<DD>Upon successful creation, the <A HREF="../../../com/google/inject/Injector.html" title="interface in com.google.inject"><CODE>Injector</CODE></A> will inject instance fields
 and methods of the given object.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>instance</CODE> - for which members will be injected<DT><B>Since:</B></DT>
  <DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="requestStaticInjection(java.lang.Class...)"><!-- --></A><H3>
requestStaticInjection</H3>
<PRE>
void <B>requestStaticInjection</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;...&nbsp;types)</PRE>
<DL>
<DD>Upon successful creation, the <A HREF="../../../com/google/inject/Injector.html" title="interface in com.google.inject"><CODE>Injector</CODE></A> will inject static fields
 and methods in the given classes.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>types</CODE> - for which static members will be injected</DL>
</DD>
</DL>
<HR>

<A NAME="install(com.google.inject.Module)"><!-- --></A><H3>
install</H3>
<PRE>
void <B>install</B>(<A HREF="../../../com/google/inject/Module.html" title="interface in com.google.inject">Module</A>&nbsp;module)</PRE>
<DL>
<DD>Uses the given module to configure more bindings.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="currentStage()"><!-- --></A><H3>
currentStage</H3>
<PRE>
<A HREF="../../../com/google/inject/Stage.html" title="enum in com.google.inject">Stage</A> <B>currentStage</B>()</PRE>
<DL>
<DD>Gets the current stage.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="addError(java.lang.String, java.lang.Object...)"><!-- --></A><H3>
addError</H3>
<PRE>
void <B>addError</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;message,
              <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>...&nbsp;arguments)</PRE>
<DL>
<DD>Records an error message which will be presented to the user at a later
 time. Unlike throwing an exception, this enable us to continue
 configuring the Injector and discover more errors. Uses <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html?is-external=true#format(java.lang.String, java.lang.Object...)" title="class or interface in java.lang"><CODE>String.format(String, Object[])</CODE></A> to insert the arguments into the
 message.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="addError(java.lang.Throwable)"><!-- --></A><H3>
addError</H3>
<PRE>
void <B>addError</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</A>&nbsp;t)</PRE>
<DL>
<DD>Records an exception, the full details of which will be logged, and the
 message of which will be presented to the user at a later
 time. If your Module calls something that you worry may fail, you should
 catch the exception and pass it into this.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="addError(com.google.inject.spi.Message)"><!-- --></A><H3>
addError</H3>
<PRE>
void <B>addError</B>(<A HREF="../../../com/google/inject/spi/Message.html" title="class in com.google.inject.spi">Message</A>&nbsp;message)</PRE>
<DL>
<DD>Records an error message to be presented to the user at a later time.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
  <DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="getProvider(com.google.inject.Key)"><!-- --></A><H3>
getProvider</H3>
<PRE>
&lt;T&gt; <A HREF="../../../com/google/inject/Provider.html" title="interface in com.google.inject">Provider</A>&lt;T&gt; <B>getProvider</B>(<A HREF="../../../com/google/inject/Key.html" title="class in com.google.inject">Key</A>&lt;T&gt;&nbsp;key)</PRE>
<DL>
<DD>Returns the provider used to obtain instances for the given injection key.
 The returned will not be valid until the <A HREF="../../../com/google/inject/Injector.html" title="interface in com.google.inject"><CODE>Injector</CODE></A> has been
 created. The provider will throw an <code>IllegalStateException</code> if you
 try to use it beforehand.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
  <DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="getProvider(java.lang.Class)"><!-- --></A><H3>
getProvider</H3>
<PRE>
&lt;T&gt; <A HREF="../../../com/google/inject/Provider.html" title="interface in com.google.inject">Provider</A>&lt;T&gt; <B>getProvider</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;type)</PRE>
<DL>
<DD>Returns the provider used to obtain instances for the given injection type.
 The returned provider will not be valid until the <A HREF="../../../com/google/inject/Injector.html" title="interface in com.google.inject"><CODE>Injector</CODE></A> has been
 created. The provider will throw an <code>IllegalStateException</code> if you
 try to use it beforehand.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
  <DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="getMembersInjector(com.google.inject.TypeLiteral)"><!-- --></A><H3>
getMembersInjector</H3>
<PRE>
&lt;T&gt; <A HREF="../../../com/google/inject/MembersInjector.html" title="interface in com.google.inject">MembersInjector</A>&lt;T&gt; <B>getMembersInjector</B>(<A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A>&lt;T&gt;&nbsp;typeLiteral)</PRE>
<DL>
<DD>Returns the members injector used to inject dependencies into methods and fields on instances
 of the given type <code>T</code>. The returned members injector will not be valid until the main
 <A HREF="../../../com/google/inject/Injector.html" title="interface in com.google.inject"><CODE>Injector</CODE></A> has been created. The members injector will throw an <code>IllegalStateException</code> if you try to use it beforehand.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>typeLiteral</CODE> - type to get members injector for<DT><B>Since:</B></DT>
  <DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="getMembersInjector(java.lang.Class)"><!-- --></A><H3>
getMembersInjector</H3>
<PRE>
&lt;T&gt; <A HREF="../../../com/google/inject/MembersInjector.html" title="interface in com.google.inject">MembersInjector</A>&lt;T&gt; <B>getMembersInjector</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;type)</PRE>
<DL>
<DD>Returns the members injector used to inject dependencies into methods and fields on instances
 of the given type <code>T</code>. The returned members injector will not be valid until the main
 <A HREF="../../../com/google/inject/Injector.html" title="interface in com.google.inject"><CODE>Injector</CODE></A> has been created. The members injector will throw an <code>IllegalStateException</code> if you try to use it beforehand.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - type to get members injector for<DT><B>Since:</B></DT>
  <DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="convertToTypes(com.google.inject.matcher.Matcher, com.google.inject.spi.TypeConverter)"><!-- --></A><H3>
convertToTypes</H3>
<PRE>
void <B>convertToTypes</B>(<A HREF="../../../com/google/inject/matcher/Matcher.html" title="interface in com.google.inject.matcher">Matcher</A>&lt;? super <A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A>&lt;?&gt;&gt;&nbsp;typeMatcher,
                    <A HREF="../../../com/google/inject/spi/TypeConverter.html" title="interface in com.google.inject.spi">TypeConverter</A>&nbsp;converter)</PRE>
<DL>
<DD>Binds a type converter. The injector will use the given converter to
 convert string constants to matching types as needed.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>typeMatcher</CODE> - matches types the converter can handle<DD><CODE>converter</CODE> - converts values<DT><B>Since:</B></DT>
  <DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="bindListener(com.google.inject.matcher.Matcher, com.google.inject.spi.TypeListener)"><!-- --></A><H3>
bindListener</H3>
<PRE>
void <B>bindListener</B>(<A HREF="../../../com/google/inject/matcher/Matcher.html" title="interface in com.google.inject.matcher">Matcher</A>&lt;? super <A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A>&lt;?&gt;&gt;&nbsp;typeMatcher,
                  <A HREF="../../../com/google/inject/spi/TypeListener.html" title="interface in com.google.inject.spi">TypeListener</A>&nbsp;listener)</PRE>
<DL>
<DD>Registers a listener for injectable types. Guice will notify the listener when it encounters
 injectable types matched by the given type matcher.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>typeMatcher</CODE> - that matches injectable types the listener should be notified of<DD><CODE>listener</CODE> - for injectable types matched by typeMatcher<DT><B>Since:</B></DT>
  <DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="withSource(java.lang.Object)"><!-- --></A><H3>
withSource</H3>
<PRE>
<A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject">Binder</A> <B>withSource</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;source)</PRE>
<DL>
<DD>Returns a binder that uses <code>source</code> as the reference location for
 configuration errors. This is typically a <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StackTraceElement.html?is-external=true" title="class or interface in java.lang"><CODE>StackTraceElement</CODE></A>
 for <code>.java</code> source but it could any binding source, such as the
 path to a <code>.properties</code> file.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - any object representing the source location and has a
     concise <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang"><CODE>toString()</CODE></A> value
<DT><B>Returns:</B><DD>a binder that shares its configuration with this binder<DT><B>Since:</B></DT>
  <DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="skipSources(java.lang.Class...)"><!-- --></A><H3>
skipSources</H3>
<PRE>
<A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject">Binder</A> <B>skipSources</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>...&nbsp;classesToSkip)</PRE>
<DL>
<DD>Returns a binder that skips <code>classesToSkip</code> when identify the
 calling code. The caller's <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StackTraceElement.html?is-external=true" title="class or interface in java.lang"><CODE>StackTraceElement</CODE></A> is used to locate
 the source of configuration errors.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>classesToSkip</CODE> - library classes that create bindings on behalf of
      their clients.
<DT><B>Returns:</B><DD>a binder that shares its configuration with this binder.<DT><B>Since:</B></DT>
  <DD>2.0</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="newPrivateBinder()"><!-- --></A><H3>
newPrivateBinder</H3>
<PRE>
<A HREF="../../../com/google/inject/PrivateBinder.html" title="interface in com.google.inject">PrivateBinder</A> <B>newPrivateBinder</B>()</PRE>
<DL>
<DD>Creates a new private child environment for bindings and other configuration. The returned
 binder can be used to add and configuration information in this environment. See <A HREF="../../../com/google/inject/PrivateModule.html" title="class in com.google.inject"><CODE>PrivateModule</CODE></A> for details.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a binder that inherits configuration from this binder. Only exposed configuration on
      the returned binder will be visible to this binder.<DT><B>Since:</B></DT>
  <DD>2.0</DD>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Binder.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../com/google/inject/AbstractModule.html" title="class in com.google.inject"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/google/inject/Binding.html" title="interface in com.google.inject"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?com/google/inject/Binder.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Binder.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
<i>Copyright 2009 Google Inc. All Rights Reserved.</i>
</BODY>
</HTML>