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> </TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD><TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD></TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../com/google/gwt/inject/rebind/util/NameGenerator.html" title="class in com.google.gwt.inject.rebind.util"><B>PREV CLASS</B></A> 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> <A HREF="SourceWriteUtil.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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> keyUtil,<A HREF="../../../../../../com/google/gwt/inject/rebind/util/NameGenerator.html" title="class in com.google.gwt.inject.rebind.util">NameGenerator</A> nameGenerator,<A HREF="../../../../../../com/google/gwt/inject/rebind/util/MemberCollector.html" title="class in com.google.gwt.inject.rebind.util">MemberCollector</A> memberCollector,<A HREF="../../../../../../com/google/gwt/inject/rebind/binding/BindingIndex.html" title="interface in com.google.gwt.inject.rebind.binding">BindingIndex</A> bindingIndex)</CODE><BR> </TD></TR></TABLE> <!-- ========== 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> 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 sourceWriter,java.lang.Iterable<com.google.gwt.core.ext.typeinfo.JField> fields,java.lang.String injecteeName)</CODE><BR> Appends a field injecting method for each passed field to the<code>sourceWriter</code> and returns a string that invokes all writtenmethods.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> 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 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><?> key)</CODE><BR> Appends a full member injection (methods and fields) to the providedwriter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> 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 sourceWriter,com.google.gwt.core.ext.typeinfo.JConstructor constructor)</CODE><BR> Appends a constructor injecting method to the <code>sourceWriter</code> andreturns 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> 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 sourceWriter,com.google.gwt.core.ext.typeinfo.JField field,java.lang.String injecteeName)</CODE><BR> Appends a field injecting method to the <code>sourceWriter</code> and returns astring that invokes the written method.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> 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 sourceWriter,com.google.gwt.core.ext.typeinfo.JAbstractMethod method,java.lang.String injecteeName)</CODE><BR> Appends a new method to the <code>sourceWriter</code> that calls the passedmethod 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> 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 sourceWriter,java.lang.Iterable<? extends com.google.gwt.core.ext.typeinfo.JAbstractMethod> methods,java.lang.String injecteeName)</CODE><BR> Appends a method injecting method to the <code>sourceWriter</code> and returnsa string that invokes the written method.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> 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 type)</CODE><BR> Returns a string representation of the passed type's name while ensuringthat all type names (base and parameters) are converted to source typenames.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> 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><?> typeLiteral)</CODE><BR> Alternate toString method for TypeLiterals that fixes a JDK bug that wasreplicated in Guice.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> 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 writer,java.lang.String signature,java.lang.String body)</CODE><BR> 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> 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 writer,java.lang.String signature,java.lang.String body)</CODE><BR> Writes a native method with the given signature and body to the sourcewriter.</TD></TR></TABLE> <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> <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> keyUtil,<A HREF="../../../../../../com/google/gwt/inject/rebind/util/NameGenerator.html" title="class in com.google.gwt.inject.rebind.util">NameGenerator</A> nameGenerator,<A HREF="../../../../../../com/google/gwt/inject/rebind/util/MemberCollector.html" title="class in com.google.gwt.inject.rebind.util">MemberCollector</A> memberCollector,<A HREF="../../../../../../com/google/gwt/inject/rebind/binding/BindingIndex.html" title="interface in com.google.gwt.inject.rebind.binding">BindingIndex</A> 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 sourceWriter,java.lang.Iterable<com.google.gwt.core.ext.typeinfo.JField> fields,java.lang.String 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 writtenmethods.<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 valuesare 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 sourceWriter,com.google.gwt.core.ext.typeinfo.JField field,java.lang.String injecteeName)</PRE><DL><DD>Appends a field injecting method to the <code>sourceWriter</code> and returns astring 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 valuesare 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 sourceWriter,java.lang.Iterable<? extends com.google.gwt.core.ext.typeinfo.JAbstractMethod> methods,java.lang.String injecteeName)</PRE><DL><DD>Appends a method injecting method to the <code>sourceWriter</code> and returnsa string that invokes the written method. The values for the passedmethod'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 nativemethod will pass on (i.e. return) the result of the actual method'sinvocation, if any.<p/>The passed method collection can contain constructors (they'll be treatedcorrectly) if no <code>injecteeName</code> is passed. The same applies forstatic methods.<p/>If a method without parameters is provided, that method will be called andno 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 valuesare 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 sourceWriter,com.google.gwt.core.ext.typeinfo.JConstructor constructor)</PRE><DL><DD>Appends a constructor injecting method to the <code>sourceWriter</code> andreturns a string that invokes the written method. The written methodreturns 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 sourceWriter,com.google.gwt.core.ext.typeinfo.JAbstractMethod method,java.lang.String injecteeName)</PRE><DL><DD>Appends a new method to the <code>sourceWriter</code> that calls the passedmethod and returns a string that invokes the written method. The writtenmethod returns the passed method's return value, if any.<p/>If a method without parameters is provided, that method will be called andno 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 valuesare injected, in the context of the returned call string. If nullall 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 writer,java.lang.String signature,java.lang.String 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 writer,java.lang.String signature,java.lang.String body)</PRE><DL><DD>Writes a native method with the given signature and body to the sourcewriter.<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 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><?> key)</PRE><DL><DD>Appends a full member injection (methods and fields) to the providedwriter.<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><?> typeLiteral)</PRE><DL><DD>Alternate toString method for TypeLiterals that fixes a JDK bug that wasreplicated 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 (basetype 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 type)</PRE><DL><DD>Returns a string representation of the passed type's name while ensuringthat all type names (base and parameters) are converted to source typenames.<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> </TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD><TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD></TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../com/google/gwt/inject/rebind/util/NameGenerator.html" title="class in com.google.gwt.inject.rebind.util"><B>PREV CLASS</B></A> 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> <A HREF="SourceWriteUtil.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>