Subversion Repositories SmartDukaan

Rev

Rev 156 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<!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.5.0_22) on Wed Jan 06 21:26:38 EST 2010 -->
<TITLE>
SourceWriteUtil
</TITLE>

<META NAME="keywords" CONTENT="com.google.gwt.inject.rebind.util.SourceWriteUtil class">

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

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="SourceWriteUtil";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

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


<!-- ========= 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="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/gwt/inject/rebind/util/NameGenerator.html" title="class in com.google.gwt.inject.rebind.util"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?com/google/gwt/inject/rebind/util/SourceWriteUtil.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="SourceWriteUtil.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;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&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.gwt.inject.rebind.util</FONT>
<BR>
Class SourceWriteUtil</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>com.google.gwt.inject.rebind.util.SourceWriteUtil</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>SourceWriteUtil</B><DT>extends java.lang.Object</DL>
</PRE>

<P>
Simple helper object for source writing.
<P>

<P>
<HR>

<P>

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_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>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<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,
                <A HREF="../../../../../../com/google/gwt/inject/rebind/util/NameGenerator.html" title="class in com.google.gwt.inject.rebind.util">NameGenerator</A>&nbsp;nameGenerator,
                <A HREF="../../../../../../com/google/gwt/inject/rebind/util/MemberCollector.html" title="class in com.google.gwt.inject.rebind.util">MemberCollector</A>&nbsp;memberCollector,
                <A HREF="../../../../../../com/google/gwt/inject/rebind/binding/BindingIndex.html" title="interface in com.google.gwt.inject.rebind.binding">BindingIndex</A>&nbsp;bindingIndex)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== 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;java.lang.String</CODE></FONT></TD>
<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,
                     java.lang.Iterable&lt;com.google.gwt.core.ext.typeinfo.JField&gt;&nbsp;fields,
                     java.lang.String&nbsp;injecteeName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends a field injecting method for each passed field to the
 <code>sourceWriter</code> and returns a string that invokes all written
 methods.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<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,
                      <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>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends a full member injection (methods and fields) to the provided
 writer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<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,
                           com.google.gwt.core.ext.typeinfo.JConstructor&nbsp;constructor)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends a constructor injecting method to the <code>sourceWriter</code> and
 returns a string that invokes the written method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<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,
                     com.google.gwt.core.ext.typeinfo.JField&nbsp;field,
                     java.lang.String&nbsp;injecteeName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends a field injecting method to the <code>sourceWriter</code> and returns a
 string that invokes the written method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<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,
                              com.google.gwt.core.ext.typeinfo.JAbstractMethod&nbsp;method,
                              java.lang.String&nbsp;injecteeName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends a new method to the <code>sourceWriter</code> that calls the passed
 method and returns a string that invokes the written method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<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,
                      java.lang.Iterable&lt;? extends com.google.gwt.core.ext.typeinfo.JAbstractMethod&gt;&nbsp;methods,
                      java.lang.String&nbsp;injecteeName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends a method injecting method to the <code>sourceWriter</code> and returns
 a string that invokes the written method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<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>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a string representation of the passed type's name while ensuring
 that all type names (base and parameters) are converted to source type
 names.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<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>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Alternate toString method for TypeLiterals that fixes a JDK bug that was
 replicated in Guice.</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/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,
            java.lang.String&nbsp;signature,
            java.lang.String&nbsp;body)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a method with the given signature and body to the source writer.</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/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,
                  java.lang.String&nbsp;signature,
                  java.lang.String&nbsp;body)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a native method with the given signature and body to the source
 writer.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_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>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<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>
SourceWriteUtil</H3>
<PRE>
<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>
</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,
                                 <A HREF="../../../../../../com/google/gwt/inject/rebind/util/NameGenerator.html" title="class in com.google.gwt.inject.rebind.util">NameGenerator</A>&nbsp;nameGenerator,
                                 <A HREF="../../../../../../com/google/gwt/inject/rebind/util/MemberCollector.html" title="class in com.google.gwt.inject.rebind.util">MemberCollector</A>&nbsp;memberCollector,
                                 <A HREF="../../../../../../com/google/gwt/inject/rebind/binding/BindingIndex.html" title="interface in com.google.gwt.inject.rebind.binding">BindingIndex</A>&nbsp;bindingIndex)</PRE>
<DL>
</DL>

<!-- ============ 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="appendFieldInjection(com.google.gwt.user.rebind.SourceWriter, java.lang.Iterable, java.lang.String)"><!-- --></A><H3>
appendFieldInjection</H3>
<PRE>
public java.lang.String <B>appendFieldInjection</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;sourceWriter,
                                             java.lang.Iterable&lt;com.google.gwt.core.ext.typeinfo.JField&gt;&nbsp;fields,
                                             java.lang.String&nbsp;injecteeName)</PRE>
<DL>
<DD>Appends a field injecting method for each passed field to the
 <code>sourceWriter</code> and returns a string that invokes all written
 methods.
<P>
<DD><DL>
<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
          are injected, in the context of the returned call string
<DT><B>Returns:</B><DD>string calling the generated method</DL>
</DD>
</DL>
<HR>

<A NAME="createFieldInjection(com.google.gwt.user.rebind.SourceWriter, com.google.gwt.core.ext.typeinfo.JField, java.lang.String)"><!-- --></A><H3>
createFieldInjection</H3>
<PRE>
public java.lang.String <B>createFieldInjection</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;sourceWriter,
                                             com.google.gwt.core.ext.typeinfo.JField&nbsp;field,
                                             java.lang.String&nbsp;injecteeName)</PRE>
<DL>
<DD>Appends a field injecting method to the <code>sourceWriter</code> and returns a
 string that invokes the written method.
<P>
<DD><DL>
<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
          are injected, in the context of the returned call string
<DT><B>Returns:</B><DD>string calling the generated method</DL>
</DD>
</DL>
<HR>

<A NAME="createMethodInjection(com.google.gwt.user.rebind.SourceWriter, java.lang.Iterable, java.lang.String)"><!-- --></A><H3>
createMethodInjection</H3>
<PRE>
public java.lang.String <B>createMethodInjection</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;sourceWriter,
                                              java.lang.Iterable&lt;? extends com.google.gwt.core.ext.typeinfo.JAbstractMethod&gt;&nbsp;methods,
                                              java.lang.String&nbsp;injecteeName)</PRE>
<DL>
<DD>Appends a method injecting method to the <code>sourceWriter</code> and returns
 a string that invokes the written method.  The values for the passed
 method's parameters are retrieved through the
 <A HREF="../../../../../../com/google/gwt/inject/client/Ginjector.html" title="interface in com.google.gwt.inject.client"><CODE>Ginjector</CODE></A>.
 <p/>
 If the passed method collection contains only one actual method, the native
 method will pass on (i.e. return) the result of the actual method's
 invocation, if any.
 <p/>
 The passed method collection can contain constructors (they'll be treated
 correctly) if no <code>injecteeName</code> is passed.  The same applies for
 static methods.
 <p/>
 If a method without parameters is provided, that method will be called and
 no parameters will be passed.
<P>
<DD><DL>
<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
            are injected, in the context of the returned call string. If
            <code>null</code> all passed methods are called as static/constructors.
<DT><B>Returns:</B><DD>string calling the generated method</DL>
</DD>
</DL>
<HR>

<A NAME="createConstructorInjection(com.google.gwt.user.rebind.SourceWriter, com.google.gwt.core.ext.typeinfo.JConstructor)"><!-- --></A><H3>
createConstructorInjection</H3>
<PRE>
public java.lang.String <B>createConstructorInjection</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;sourceWriter,
                                                   com.google.gwt.core.ext.typeinfo.JConstructor&nbsp;constructor)</PRE>
<DL>
<DD>Appends a constructor injecting method to the <code>sourceWriter</code> and
 returns a string that invokes the written method.  The written method
 returns the constructed object.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sourceWriter</CODE> - writer to which the injecting method is written<DD><CODE>constructor</CODE> - constructor to call
<DT><B>Returns:</B><DD>string calling the generated method</DL>
</DD>
</DL>
<HR>

<A NAME="createMethodCallWithInjection(com.google.gwt.user.rebind.SourceWriter, com.google.gwt.core.ext.typeinfo.JAbstractMethod, java.lang.String)"><!-- --></A><H3>
createMethodCallWithInjection</H3>
<PRE>
public java.lang.String <B>createMethodCallWithInjection</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;sourceWriter,
                                                      com.google.gwt.core.ext.typeinfo.JAbstractMethod&nbsp;method,
                                                      java.lang.String&nbsp;injecteeName)</PRE>
<DL>
<DD>Appends a new method to the <code>sourceWriter</code> that calls the passed
 method and returns a string that invokes the written method.  The written
 method returns the passed method's return value, if any.
 <p/>
 If a method without parameters is provided, that method will be called and
 no parameters will be passed.
<P>
<DD><DL>
<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
          are injected, in the context of the returned call string. If null
          all passed methods are called as static/constructors.
<DT><B>Returns:</B><DD>string calling the generated method</DL>
</DD>
</DL>
<HR>

<A NAME="writeMethod(com.google.gwt.user.rebind.SourceWriter, java.lang.String, java.lang.String)"><!-- --></A><H3>
writeMethod</H3>
<PRE>
public void <B>writeMethod</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;writer,
                        java.lang.String&nbsp;signature,
                        java.lang.String&nbsp;body)</PRE>
<DL>
<DD>Writes a method with the given signature and body to the source writer.
<P>
<DD><DL>
<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>
</DD>
</DL>
<HR>

<A NAME="writeNativeMethod(com.google.gwt.user.rebind.SourceWriter, java.lang.String, java.lang.String)"><!-- --></A><H3>
writeNativeMethod</H3>
<PRE>
public void <B>writeNativeMethod</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;writer,
                              java.lang.String&nbsp;signature,
                              java.lang.String&nbsp;body)</PRE>
<DL>
<DD>Writes a native method with the given signature and body to the source
 writer.
<P>
<DD><DL>
<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>
</DD>
</DL>
<HR>

<A NAME="appendMemberInjection(com.google.gwt.user.rebind.SourceWriter, com.google.inject.Key)"><!-- --></A><H3>
appendMemberInjection</H3>
<PRE>
public java.lang.String <B>appendMemberInjection</B>(com.google.gwt.user.rebind.SourceWriter&nbsp;writer,
                                              <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>
<DL>
<DD>Appends a full member injection (methods and fields) to the provided
 writer.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>writer</CODE> - source writer to write to<DD><CODE>key</CODE> - key for which the injection is performed
<DT><B>Returns:</B><DD>name of the method created</DL>
</DD>
</DL>
<HR>

<A NAME="getSourceName(com.google.inject.TypeLiteral)"><!-- --></A><H3>
getSourceName</H3>
<PRE>
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>
<DL>
<DD>Alternate toString method for TypeLiterals that fixes a JDK bug that was
 replicated in Guice. See
 <a href="http://code.google.com/p/google-guice/issues/detail?id=293">
 the related Guice bug</a> for details.

 Also replaces all binary with source names in the types involved (base
 type and type parameters).
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>typeLiteral</CODE> - type for which string will be returned
<DT><B>Returns:</B><DD>String representation of type</DL>
</DD>
</DL>
<HR>

<A NAME="getSourceName(java.lang.reflect.Type)"><!-- --></A><H3>
getSourceName</H3>
<PRE>
public java.lang.String <B>getSourceName</B>(java.lang.reflect.Type&nbsp;type)</PRE>
<DL>
<DD>Returns a string representation of the passed type's name while ensuring
 that all type names (base and parameters) are converted to source type
 names.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>type</CODE> - type for which string will be returned
<DT><B>Returns:</B><DD>String representation of type</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="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/gwt/inject/rebind/util/NameGenerator.html" title="class in com.google.gwt.inject.rebind.util"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?com/google/gwt/inject/rebind/util/SourceWriteUtil.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="SourceWriteUtil.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;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>