Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
156 ashish 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<!--NewPage-->
3
<HTML>
4
<HEAD>
5
<!-- Generated by javadoc (build 1.5.0_22) on Wed Jan 06 21:26:37 EST 2010 -->
6
<TITLE>
7
Ginjector
8
</TITLE>
9
 
10
<META NAME="keywords" CONTENT="com.google.gwt.inject.client.Ginjector interface">
11
 
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
13
 
14
<SCRIPT type="text/javascript">
15
function windowTitle()
16
{
17
    parent.document.title="Ginjector";
18
}
19
</SCRIPT>
20
<NOSCRIPT>
21
</NOSCRIPT>
22
 
23
</HEAD>
24
 
25
<BODY BGCOLOR="white" onload="windowTitle();">
26
 
27
 
28
<!-- ========= START OF TOP NAVBAR ======= -->
29
<A NAME="navbar_top"><!-- --></A>
30
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
32
<TR>
33
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34
<A NAME="navbar_top_firstrow"><!-- --></A>
35
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36
  <TR ALIGN="center" VALIGN="top">
37
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
38
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
39
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
40
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
41
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
42
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
43
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
44
  </TR>
45
</TABLE>
46
</TD>
47
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
48
</EM>
49
</TD>
50
</TR>
51
 
52
<TR>
53
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
54
&nbsp;<A HREF="../../../../../com/google/gwt/inject/client/AbstractGinModule.html" title="class in com.google.gwt.inject.client"><B>PREV CLASS</B></A>&nbsp;
55
&nbsp;<A HREF="../../../../../com/google/gwt/inject/client/GinModule.html" title="interface in com.google.gwt.inject.client"><B>NEXT CLASS</B></A></FONT></TD>
56
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57
  <A HREF="../../../../../index.html?com/google/gwt/inject/client/Ginjector.html" target="_top"><B>FRAMES</B></A>  &nbsp;
58
&nbsp;<A HREF="Ginjector.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
59
&nbsp;<SCRIPT type="text/javascript">
60
  <!--
61
  if(window==top) {
62
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
63
  }
64
  //-->
65
</SCRIPT>
66
<NOSCRIPT>
67
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
68
</NOSCRIPT>
69
 
70
 
71
</FONT></TD>
72
</TR>
73
<TR>
74
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
75
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;METHOD</FONT></TD>
76
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;METHOD</FONT></TD>
78
</TR>
79
</TABLE>
80
<A NAME="skip-navbar_top"></A>
81
<!-- ========= END OF TOP NAVBAR ========= -->
82
 
83
<HR>
84
<!-- ======== START OF CLASS DATA ======== -->
85
<H2>
86
<FONT SIZE="-1">
87
com.google.gwt.inject.client</FONT>
88
<BR>
89
Interface Ginjector</H2>
90
<HR>
91
<DL>
92
<DT><PRE>public interface <B>Ginjector</B></DL>
93
</PRE>
94
 
95
<P>
96
Where the GWT world stops and the GIN/Guice world begins.
97
 Analogous to Guice's <code>Injector</code>, this type can be used to bootstrap injection. Unlike
98
 Guice, however, this is not a type that you create, but rather a type that you extend. It's
99
 best explained with an example. Consider this Guice code:
100
 <pre>
101
 // Define and create a Module
102
 Module applicationModule = ...;
103
 
104
 // create an Injector
105
 Injector injector = Guice.createInjector(applicationModule);
106
 
107
 // bootstrap the injection
108
 injector.getInstance(Application.class);
109
 </pre>
110
 
111
 Here's the equivalent GIN code:
112
 <pre>
113
 // Define a GinModule (e.g. ApplicationModule) but don't create it.
114
 
115
 // create a Ginjector
116
 ApplicationGinjector ginjector = GWT.create(ApplicationGinjector.class);
117
 
118
 // bootstrap the injection
119
 RootPanel.get().add(ginjector.getApplication());
120
 
121
 (somewhere else...)
122
 
123
 // define a Ginjector subtype
124
 <code>@</code>GinModules(ApplicationModule.class)
125
 public interface ApplicationGinjector extends Ginjector {
126
   Application getApplication();
127
 }
128
 </pre>
129
 
130
 Note that this is not named "G-injector" -- its "GIN-jector."
131
<P>
132
 
133
<P>
134
<HR>
135
 
136
<P>
137
 
138
<P>
139
<!-- ========= END OF CLASS DATA ========= -->
140
<HR>
141
 
142
 
143
<!-- ======= START OF BOTTOM NAVBAR ====== -->
144
<A NAME="navbar_bottom"><!-- --></A>
145
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
146
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
147
<TR>
148
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
149
<A NAME="navbar_bottom_firstrow"><!-- --></A>
150
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
151
  <TR ALIGN="center" VALIGN="top">
152
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
153
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
154
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
155
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
156
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
157
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
158
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
159
  </TR>
160
</TABLE>
161
</TD>
162
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
163
</EM>
164
</TD>
165
</TR>
166
 
167
<TR>
168
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
169
&nbsp;<A HREF="../../../../../com/google/gwt/inject/client/AbstractGinModule.html" title="class in com.google.gwt.inject.client"><B>PREV CLASS</B></A>&nbsp;
170
&nbsp;<A HREF="../../../../../com/google/gwt/inject/client/GinModule.html" title="interface in com.google.gwt.inject.client"><B>NEXT CLASS</B></A></FONT></TD>
171
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
172
  <A HREF="../../../../../index.html?com/google/gwt/inject/client/Ginjector.html" target="_top"><B>FRAMES</B></A>  &nbsp;
173
&nbsp;<A HREF="Ginjector.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
174
&nbsp;<SCRIPT type="text/javascript">
175
  <!--
176
  if(window==top) {
177
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
178
  }
179
  //-->
180
</SCRIPT>
181
<NOSCRIPT>
182
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
183
</NOSCRIPT>
184
 
185
 
186
</FONT></TD>
187
</TR>
188
<TR>
189
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
190
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;METHOD</FONT></TD>
191
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
192
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;METHOD</FONT></TD>
193
</TR>
194
</TABLE>
195
<A NAME="skip-navbar_bottom"></A>
196
<!-- ======== END OF BOTTOM NAVBAR ======= -->
197
 
198
<HR>
199
 
200
</BODY>
201
</HTML>