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:38 EST 2010 -->
6
<TITLE>
7
SourceWriteUtil
8
</TITLE>
9
 
10
<META NAME="keywords" CONTENT="com.google.gwt.inject.rebind.util.SourceWriteUtil class">
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="SourceWriteUtil";
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/rebind/util/NameGenerator.html" title="class in com.google.gwt.inject.rebind.util"><B>PREV CLASS</B></A>&nbsp;
55
&nbsp;NEXT CLASS</FONT></TD>
56
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57
  <A HREF="../../../../../../index.html?com/google/gwt/inject/rebind/util/SourceWriteUtil.html" target="_top"><B>FRAMES</B></A>  &nbsp;
58
&nbsp;<A HREF="SourceWriteUtil.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;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
76
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></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.rebind.util</FONT>
88
<BR>
89
Class SourceWriteUtil</H2>
90
<PRE>
91
java.lang.Object
92
  <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>com.google.gwt.inject.rebind.util.SourceWriteUtil</B>
93
</PRE>
94
<HR>
95
<DL>
96
<DT><PRE>public class <B>SourceWriteUtil</B><DT>extends java.lang.Object</DL>
97
</PRE>
98
 
99
<P>
100
Simple helper object for source writing.
101
<P>
102
 
103
<P>
104
<HR>
105
 
106
<P>
107
 
108
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
109
 
110
<A NAME="constructor_summary"><!-- --></A>
111
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
112
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
113
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
114
<B>Constructor Summary</B></FONT></TH>
115
</TR>
116
<TR BGCOLOR="white" CLASS="TableRowColor">
117
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
118
<CODE>protected </CODE></FONT></TD>
119
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/inject/rebind/util/SourceWriteUtil.html#SourceWriteUtil(com.google.gwt.inject.rebind.util.KeyUtil, com.google.gwt.inject.rebind.util.NameGenerator, com.google.gwt.inject.rebind.util.MemberCollector, com.google.gwt.inject.rebind.binding.BindingIndex)">SourceWriteUtil</A></B>(<A HREF="../../../../../../com/google/gwt/inject/rebind/util/KeyUtil.html" title="class in com.google.gwt.inject.rebind.util">KeyUtil</A>&nbsp;keyUtil,
120
                <A HREF="../../../../../../com/google/gwt/inject/rebind/util/NameGenerator.html" title="class in com.google.gwt.inject.rebind.util">NameGenerator</A>&nbsp;nameGenerator,
121
                <A HREF="../../../../../../com/google/gwt/inject/rebind/util/MemberCollector.html" title="class in com.google.gwt.inject.rebind.util">MemberCollector</A>&nbsp;memberCollector,
122
                <A HREF="../../../../../../com/google/gwt/inject/rebind/binding/BindingIndex.html" title="interface in com.google.gwt.inject.rebind.binding">BindingIndex</A>&nbsp;bindingIndex)</CODE>
123
 
124
<BR>
125
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
126
</TR>
127
</TABLE>
128
&nbsp;
129
<!-- ========== METHOD SUMMARY =========== -->
130
 
131
<A NAME="method_summary"><!-- --></A>
132
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
133
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
134
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
135
<B>Method Summary</B></FONT></TH>
136
</TR>
137
<TR BGCOLOR="white" CLASS="TableRowColor">
138
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
139
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
140
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/inject/rebind/util/SourceWriteUtil.html#appendFieldInjection(com.google.gwt.user.rebind.SourceWriter, java.lang.Iterable, java.lang.String)">appendFieldInjection</A></B>(com.google.gwt.user.rebind.SourceWriter&nbsp;sourceWriter,
141
                     java.lang.Iterable&lt;com.google.gwt.core.ext.typeinfo.JField&gt;&nbsp;fields,
142
                     java.lang.String&nbsp;injecteeName)</CODE>
143
 
144
<BR>
145
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends a field injecting method for each passed field to the
146
 <code>sourceWriter</code> and returns a string that invokes all written
147
 methods.</TD>
148
</TR>
149
<TR BGCOLOR="white" CLASS="TableRowColor">
150
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
151
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
152
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/inject/rebind/util/SourceWriteUtil.html#appendMemberInjection(com.google.gwt.user.rebind.SourceWriter, com.google.inject.Key)">appendMemberInjection</A></B>(com.google.gwt.user.rebind.SourceWriter&nbsp;writer,
153
                      <A HREF="http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/Key.html" title="class or interface in com.google.inject">Key</A>&lt;?&gt;&nbsp;key)</CODE>
154
 
155
<BR>
156
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends a full member injection (methods and fields) to the provided
157
 writer.</TD>
158
</TR>
159
<TR BGCOLOR="white" CLASS="TableRowColor">
160
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
161
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
162
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/inject/rebind/util/SourceWriteUtil.html#createConstructorInjection(com.google.gwt.user.rebind.SourceWriter, com.google.gwt.core.ext.typeinfo.JConstructor)">createConstructorInjection</A></B>(com.google.gwt.user.rebind.SourceWriter&nbsp;sourceWriter,
163
                           com.google.gwt.core.ext.typeinfo.JConstructor&nbsp;constructor)</CODE>
164
 
165
<BR>
166
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends a constructor injecting method to the <code>sourceWriter</code> and
167
 returns a string that invokes the written method.</TD>
168
</TR>
169
<TR BGCOLOR="white" CLASS="TableRowColor">
170
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
171
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
172
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/inject/rebind/util/SourceWriteUtil.html#createFieldInjection(com.google.gwt.user.rebind.SourceWriter, com.google.gwt.core.ext.typeinfo.JField, java.lang.String)">createFieldInjection</A></B>(com.google.gwt.user.rebind.SourceWriter&nbsp;sourceWriter,
173
                     com.google.gwt.core.ext.typeinfo.JField&nbsp;field,
174
                     java.lang.String&nbsp;injecteeName)</CODE>
175
 
176
<BR>
177
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends a field injecting method to the <code>sourceWriter</code> and returns a
178
 string that invokes the written method.</TD>
179
</TR>
180
<TR BGCOLOR="white" CLASS="TableRowColor">
181
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
182
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
183
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/inject/rebind/util/SourceWriteUtil.html#createMethodCallWithInjection(com.google.gwt.user.rebind.SourceWriter, com.google.gwt.core.ext.typeinfo.JAbstractMethod, java.lang.String)">createMethodCallWithInjection</A></B>(com.google.gwt.user.rebind.SourceWriter&nbsp;sourceWriter,
184
                              com.google.gwt.core.ext.typeinfo.JAbstractMethod&nbsp;method,
185
                              java.lang.String&nbsp;injecteeName)</CODE>
186
 
187
<BR>
188
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends a new method to the <code>sourceWriter</code> that calls the passed
189
 method and returns a string that invokes the written method.</TD>
190
</TR>
191
<TR BGCOLOR="white" CLASS="TableRowColor">
192
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
193
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
194
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/inject/rebind/util/SourceWriteUtil.html#createMethodInjection(com.google.gwt.user.rebind.SourceWriter, java.lang.Iterable, java.lang.String)">createMethodInjection</A></B>(com.google.gwt.user.rebind.SourceWriter&nbsp;sourceWriter,
195
                      java.lang.Iterable&lt;? extends com.google.gwt.core.ext.typeinfo.JAbstractMethod&gt;&nbsp;methods,
196
                      java.lang.String&nbsp;injecteeName)</CODE>
197
 
198
<BR>
199
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends a method injecting method to the <code>sourceWriter</code> and returns
200
 a string that invokes the written method.</TD>
201
</TR>
202
<TR BGCOLOR="white" CLASS="TableRowColor">
203
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
204
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
205
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/inject/rebind/util/SourceWriteUtil.html#getSourceName(java.lang.reflect.Type)">getSourceName</A></B>(java.lang.reflect.Type&nbsp;type)</CODE>
206
 
207
<BR>
208
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a string representation of the passed type's name while ensuring
209
 that all type names (base and parameters) are converted to source type
210
 names.</TD>
211
</TR>
212
<TR BGCOLOR="white" CLASS="TableRowColor">
213
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
214
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
215
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/inject/rebind/util/SourceWriteUtil.html#getSourceName(com.google.inject.TypeLiteral)">getSourceName</A></B>(<A HREF="http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/TypeLiteral.html" title="class or interface in com.google.inject">TypeLiteral</A>&lt;?&gt;&nbsp;typeLiteral)</CODE>
216
 
217
<BR>
218
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Alternate toString method for TypeLiterals that fixes a JDK bug that was
219
 replicated in Guice.</TD>
220
</TR>
221
<TR BGCOLOR="white" CLASS="TableRowColor">
222
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
223
<CODE>&nbsp;void</CODE></FONT></TD>
224
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/inject/rebind/util/SourceWriteUtil.html#writeMethod(com.google.gwt.user.rebind.SourceWriter, java.lang.String, java.lang.String)">writeMethod</A></B>(com.google.gwt.user.rebind.SourceWriter&nbsp;writer,
225
            java.lang.String&nbsp;signature,
226
            java.lang.String&nbsp;body)</CODE>
227
 
228
<BR>
229
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a method with the given signature and body to the source writer.</TD>
230
</TR>
231
<TR BGCOLOR="white" CLASS="TableRowColor">
232
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
233
<CODE>&nbsp;void</CODE></FONT></TD>
234
<TD><CODE><B><A HREF="../../../../../../com/google/gwt/inject/rebind/util/SourceWriteUtil.html#writeNativeMethod(com.google.gwt.user.rebind.SourceWriter, java.lang.String, java.lang.String)">writeNativeMethod</A></B>(com.google.gwt.user.rebind.SourceWriter&nbsp;writer,
235
                  java.lang.String&nbsp;signature,
236
                  java.lang.String&nbsp;body)</CODE>
237
 
238
<BR>
239
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a native method with the given signature and body to the source
240
 writer.</TD>
241
</TR>
242
</TABLE>
243
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
244
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
245
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
246
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
247
</TR>
248
<TR BGCOLOR="white" CLASS="TableRowColor">
249
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
250
</TR>
251
</TABLE>
252
&nbsp;
253
<P>
254
 
255
<!-- ========= CONSTRUCTOR DETAIL ======== -->
256
 
257
<A NAME="constructor_detail"><!-- --></A>
258
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
259
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
260
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
261
<B>Constructor Detail</B></FONT></TH>
262
</TR>
263
</TABLE>
264
 
265
<A NAME="SourceWriteUtil(com.google.gwt.inject.rebind.util.KeyUtil, com.google.gwt.inject.rebind.util.NameGenerator, com.google.gwt.inject.rebind.util.MemberCollector, com.google.gwt.inject.rebind.binding.BindingIndex)"><!-- --></A><H3>
266
SourceWriteUtil</H3>
267
<PRE>
268
<FONT SIZE="-1"><A HREF="http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/Inject.html" title="class or interface in com.google.inject">@Inject</A>
269
</FONT>protected <B>SourceWriteUtil</B>(<A HREF="../../../../../../com/google/gwt/inject/rebind/util/KeyUtil.html" title="class in com.google.gwt.inject.rebind.util">KeyUtil</A>&nbsp;keyUtil,
270
                                 <A HREF="../../../../../../com/google/gwt/inject/rebind/util/NameGenerator.html" title="class in com.google.gwt.inject.rebind.util">NameGenerator</A>&nbsp;nameGenerator,
271
                                 <A HREF="../../../../../../com/google/gwt/inject/rebind/util/MemberCollector.html" title="class in com.google.gwt.inject.rebind.util">MemberCollector</A>&nbsp;memberCollector,
272
                                 <A HREF="../../../../../../com/google/gwt/inject/rebind/binding/BindingIndex.html" title="interface in com.google.gwt.inject.rebind.binding">BindingIndex</A>&nbsp;bindingIndex)</PRE>
273
<DL>
274
</DL>
275
 
276
<!-- ============ METHOD DETAIL ========== -->
277
 
278
<A NAME="method_detail"><!-- --></A>
279
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
280
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
281
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
282
<B>Method Detail</B></FONT></TH>
283
</TR>
284
</TABLE>
285
 
286
<A NAME="appendFieldInjection(com.google.gwt.user.rebind.SourceWriter, java.lang.Iterable, java.lang.String)"><!-- --></A><H3>
287
appendFieldInjection</H3>
288
<PRE>
289
public java.lang.String <B>appendFieldInjection</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;sourceWriter,
290
                                             java.lang.Iterable&lt;com.google.gwt.core.ext.typeinfo.JField&gt;&nbsp;fields,
291
                                             java.lang.String&nbsp;injecteeName)</PRE>
292
<DL>
293
<DD>Appends a field injecting method for each passed field to the
294
 <code>sourceWriter</code> and returns a string that invokes all written
295
 methods.
296
<P>
297
<DD><DL>
298
<DT><B>Parameters:</B><DD><CODE>sourceWriter</CODE> - writer to which the injecting method is written<DD><CODE>fields</CODE> - fields to be injected<DD><CODE>injecteeName</CODE> - variable that references the object into which values
299
          are injected, in the context of the returned call string
300
<DT><B>Returns:</B><DD>string calling the generated method</DL>
301
</DD>
302
</DL>
303
<HR>
304
 
305
<A NAME="createFieldInjection(com.google.gwt.user.rebind.SourceWriter, com.google.gwt.core.ext.typeinfo.JField, java.lang.String)"><!-- --></A><H3>
306
createFieldInjection</H3>
307
<PRE>
308
public java.lang.String <B>createFieldInjection</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;sourceWriter,
309
                                             com.google.gwt.core.ext.typeinfo.JField&nbsp;field,
310
                                             java.lang.String&nbsp;injecteeName)</PRE>
311
<DL>
312
<DD>Appends a field injecting method to the <code>sourceWriter</code> and returns a
313
 string that invokes the written method.
314
<P>
315
<DD><DL>
316
<DT><B>Parameters:</B><DD><CODE>sourceWriter</CODE> - writer to which the injecting method is written<DD><CODE>field</CODE> - field to be injected<DD><CODE>injecteeName</CODE> - variable that references the object into which values
317
          are injected, in the context of the returned call string
318
<DT><B>Returns:</B><DD>string calling the generated method</DL>
319
</DD>
320
</DL>
321
<HR>
322
 
323
<A NAME="createMethodInjection(com.google.gwt.user.rebind.SourceWriter, java.lang.Iterable, java.lang.String)"><!-- --></A><H3>
324
createMethodInjection</H3>
325
<PRE>
326
public java.lang.String <B>createMethodInjection</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;sourceWriter,
327
                                              java.lang.Iterable&lt;? extends com.google.gwt.core.ext.typeinfo.JAbstractMethod&gt;&nbsp;methods,
328
                                              java.lang.String&nbsp;injecteeName)</PRE>
329
<DL>
330
<DD>Appends a method injecting method to the <code>sourceWriter</code> and returns
331
 a string that invokes the written method.  The values for the passed
332
 method's parameters are retrieved through the
333
 <A HREF="../../../../../../com/google/gwt/inject/client/Ginjector.html" title="interface in com.google.gwt.inject.client"><CODE>Ginjector</CODE></A>.
334
 <p/>
335
 If the passed method collection contains only one actual method, the native
336
 method will pass on (i.e. return) the result of the actual method's
337
 invocation, if any.
338
 <p/>
339
 The passed method collection can contain constructors (they'll be treated
340
 correctly) if no <code>injecteeName</code> is passed.  The same applies for
341
 static methods.
342
 <p/>
343
 If a method without parameters is provided, that method will be called and
344
 no parameters will be passed.
345
<P>
346
<DD><DL>
347
<DT><B>Parameters:</B><DD><CODE>sourceWriter</CODE> - writer to which the injecting method is written<DD><CODE>methods</CODE> - methods to be called & injected<DD><CODE>injecteeName</CODE> - variable that references the object into which values
348
            are injected, in the context of the returned call string. If
349
            <code>null</code> all passed methods are called as static/constructors.
350
<DT><B>Returns:</B><DD>string calling the generated method</DL>
351
</DD>
352
</DL>
353
<HR>
354
 
355
<A NAME="createConstructorInjection(com.google.gwt.user.rebind.SourceWriter, com.google.gwt.core.ext.typeinfo.JConstructor)"><!-- --></A><H3>
356
createConstructorInjection</H3>
357
<PRE>
358
public java.lang.String <B>createConstructorInjection</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;sourceWriter,
359
                                                   com.google.gwt.core.ext.typeinfo.JConstructor&nbsp;constructor)</PRE>
360
<DL>
361
<DD>Appends a constructor injecting method to the <code>sourceWriter</code> and
362
 returns a string that invokes the written method.  The written method
363
 returns the constructed object.
364
<P>
365
<DD><DL>
366
<DT><B>Parameters:</B><DD><CODE>sourceWriter</CODE> - writer to which the injecting method is written<DD><CODE>constructor</CODE> - constructor to call
367
<DT><B>Returns:</B><DD>string calling the generated method</DL>
368
</DD>
369
</DL>
370
<HR>
371
 
372
<A NAME="createMethodCallWithInjection(com.google.gwt.user.rebind.SourceWriter, com.google.gwt.core.ext.typeinfo.JAbstractMethod, java.lang.String)"><!-- --></A><H3>
373
createMethodCallWithInjection</H3>
374
<PRE>
375
public java.lang.String <B>createMethodCallWithInjection</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;sourceWriter,
376
                                                      com.google.gwt.core.ext.typeinfo.JAbstractMethod&nbsp;method,
377
                                                      java.lang.String&nbsp;injecteeName)</PRE>
378
<DL>
379
<DD>Appends a new method to the <code>sourceWriter</code> that calls the passed
380
 method and returns a string that invokes the written method.  The written
381
 method returns the passed method's return value, if any.
382
 <p/>
383
 If a method without parameters is provided, that method will be called and
384
 no parameters will be passed.
385
<P>
386
<DD><DL>
387
<DT><B>Parameters:</B><DD><CODE>sourceWriter</CODE> - writer to which the injecting method is written<DD><CODE>method</CODE> - method to call (can be constructor)<DD><CODE>injecteeName</CODE> - variable that references the object into which values
388
          are injected, in the context of the returned call string. If null
389
          all passed methods are called as static/constructors.
390
<DT><B>Returns:</B><DD>string calling the generated method</DL>
391
</DD>
392
</DL>
393
<HR>
394
 
395
<A NAME="writeMethod(com.google.gwt.user.rebind.SourceWriter, java.lang.String, java.lang.String)"><!-- --></A><H3>
396
writeMethod</H3>
397
<PRE>
398
public void <B>writeMethod</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;writer,
399
                        java.lang.String&nbsp;signature,
400
                        java.lang.String&nbsp;body)</PRE>
401
<DL>
402
<DD>Writes a method with the given signature and body to the source writer.
403
<P>
404
<DD><DL>
405
<DT><B>Parameters:</B><DD><CODE>writer</CODE> - writer that the method is written to<DD><CODE>signature</CODE> - method's signature<DD><CODE>body</CODE> - method's body</DL>
406
</DD>
407
</DL>
408
<HR>
409
 
410
<A NAME="writeNativeMethod(com.google.gwt.user.rebind.SourceWriter, java.lang.String, java.lang.String)"><!-- --></A><H3>
411
writeNativeMethod</H3>
412
<PRE>
413
public void <B>writeNativeMethod</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;writer,
414
                              java.lang.String&nbsp;signature,
415
                              java.lang.String&nbsp;body)</PRE>
416
<DL>
417
<DD>Writes a native method with the given signature and body to the source
418
 writer.
419
<P>
420
<DD><DL>
421
<DT><B>Parameters:</B><DD><CODE>writer</CODE> - writer that the method is written to<DD><CODE>signature</CODE> - method's signature<DD><CODE>body</CODE> - method's body</DL>
422
</DD>
423
</DL>
424
<HR>
425
 
426
<A NAME="appendMemberInjection(com.google.gwt.user.rebind.SourceWriter, com.google.inject.Key)"><!-- --></A><H3>
427
appendMemberInjection</H3>
428
<PRE>
429
public java.lang.String <B>appendMemberInjection</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;writer,
430
                                              <A HREF="http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/Key.html" title="class or interface in com.google.inject">Key</A>&lt;?&gt;&nbsp;key)</PRE>
431
<DL>
432
<DD>Appends a full member injection (methods and fields) to the provided
433
 writer.
434
<P>
435
<DD><DL>
436
<DT><B>Parameters:</B><DD><CODE>writer</CODE> - source writer to write to<DD><CODE>key</CODE> - key for which the injection is performed
437
<DT><B>Returns:</B><DD>name of the method created</DL>
438
</DD>
439
</DL>
440
<HR>
441
 
442
<A NAME="getSourceName(com.google.inject.TypeLiteral)"><!-- --></A><H3>
443
getSourceName</H3>
444
<PRE>
445
public java.lang.String <B>getSourceName</B>(<A HREF="http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/TypeLiteral.html" title="class or interface in com.google.inject">TypeLiteral</A>&lt;?&gt;&nbsp;typeLiteral)</PRE>
446
<DL>
447
<DD>Alternate toString method for TypeLiterals that fixes a JDK bug that was
448
 replicated in Guice. See
449
 <a href="http://code.google.com/p/google-guice/issues/detail?id=293">
450
 the related Guice bug</a> for details.
451
 
452
 Also replaces all binary with source names in the types involved (base
453
 type and type parameters).
454
<P>
455
<DD><DL>
456
<DT><B>Parameters:</B><DD><CODE>typeLiteral</CODE> - type for which string will be returned
457
<DT><B>Returns:</B><DD>String representation of type</DL>
458
</DD>
459
</DL>
460
<HR>
461
 
462
<A NAME="getSourceName(java.lang.reflect.Type)"><!-- --></A><H3>
463
getSourceName</H3>
464
<PRE>
465
public java.lang.String <B>getSourceName</B>(java.lang.reflect.Type&nbsp;type)</PRE>
466
<DL>
467
<DD>Returns a string representation of the passed type's name while ensuring
468
 that all type names (base and parameters) are converted to source type
469
 names.
470
<P>
471
<DD><DL>
472
<DT><B>Parameters:</B><DD><CODE>type</CODE> - type for which string will be returned
473
<DT><B>Returns:</B><DD>String representation of type</DL>
474
</DD>
475
</DL>
476
<!-- ========= END OF CLASS DATA ========= -->
477
<HR>
478
 
479
 
480
<!-- ======= START OF BOTTOM NAVBAR ====== -->
481
<A NAME="navbar_bottom"><!-- --></A>
482
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
483
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
484
<TR>
485
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
486
<A NAME="navbar_bottom_firstrow"><!-- --></A>
487
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
488
  <TR ALIGN="center" VALIGN="top">
489
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
490
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
491
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
492
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
493
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
494
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
495
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
496
  </TR>
497
</TABLE>
498
</TD>
499
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
500
</EM>
501
</TD>
502
</TR>
503
 
504
<TR>
505
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
506
&nbsp;<A HREF="../../../../../../com/google/gwt/inject/rebind/util/NameGenerator.html" title="class in com.google.gwt.inject.rebind.util"><B>PREV CLASS</B></A>&nbsp;
507
&nbsp;NEXT CLASS</FONT></TD>
508
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
509
  <A HREF="../../../../../../index.html?com/google/gwt/inject/rebind/util/SourceWriteUtil.html" target="_top"><B>FRAMES</B></A>  &nbsp;
510
&nbsp;<A HREF="SourceWriteUtil.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
511
&nbsp;<SCRIPT type="text/javascript">
512
  <!--
513
  if(window==top) {
514
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
515
  }
516
  //-->
517
</SCRIPT>
518
<NOSCRIPT>
519
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
520
</NOSCRIPT>
521
 
522
 
523
</FONT></TD>
524
</TR>
525
<TR>
526
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
527
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
528
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
529
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
530
</TR>
531
</TABLE>
532
<A NAME="skip-navbar_bottom"></A>
533
<!-- ======== END OF BOTTOM NAVBAR ======= -->
534
 
535
<HR>
536
 
537
</BODY>
538
</HTML>