| <!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 19:22:42 PDT 2009 --> |
| <TITLE> |
| TypeLiteral (Guice 2.0 API) |
| </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="TypeLiteral (Guice 2.0 API)"; |
| } |
| } |
| </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> </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/inject/Stage.html" title="enum in com.google.inject"><B>PREV CLASS</B></A> |
| NEXT CLASS</FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../index.html?com/google/inject/TypeLiteral.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="TypeLiteral.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.inject</FONT> |
| <BR> |
| Class TypeLiteral<T></H2> |
| <PRE> |
| <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> |
| <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.google.inject.TypeLiteral<T></B> |
| </PRE> |
| <HR> |
| <DL> |
| <DT><PRE>public class <B>TypeLiteral<T></B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL> |
| </PRE> |
| |
| <P> |
| Represents a generic type <code>T</code>. Java doesn't yet provide a way to |
| represent generic types, so this class does. Forces clients to create a |
| subclass of this class which enables retrieval the type information even at |
| runtime. |
| |
| <p>For example, to create a type literal for <code>List<String></code>, you can |
| create an empty anonymous inner class: |
| |
| <p> |
| <code>TypeLiteral<List<String>> list = new TypeLiteral<List<String>>() {};</code> |
| |
| <p>This syntax cannot be used to create type literals that have wildcard |
| parameters, such as <code>Class<?></code> or <code>List<? extends CharSequence></code>. |
| Such type literals must be constructed programatically, either by <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true#getGenericReturnType()" title="class or interface in java.lang.reflect"><CODE>extracting types from members</CODE></A> or by using the |
| <A HREF="../../../com/google/inject/util/Types.html" title="class in com.google.inject.util"><CODE>Types</CODE></A> factory class. |
| |
| <p>Along with modeling generic types, this class can resolve type parameters. |
| For example, to figure out what type <code>keySet()</code> returns on a <code>Map<Integer, String></code>, use this code:<pre> <code>TypeLiteral<Map<Integer, String>> mapType |
| = new TypeLiteral<Map<Integer, String>>() {}; |
| TypeLiteral<?> keySetType |
| = mapType.getReturnType(Map.class.getMethod("keySet")); |
| System.out.println(keySetType); // prints "Set<Integer>"</code></pre> |
| <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/inject/TypeLiteral.html#TypeLiteral()">TypeLiteral</A></B>()</CODE> |
| |
| <BR> |
| Constructs a new type literal.</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> boolean</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../com/google/inject/TypeLiteral.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> o)</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><T> <A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A><T></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../com/google/inject/TypeLiteral.html#get(java.lang.Class)">get</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A><T> type)</CODE> |
| |
| <BR> |
| Gets type literal for the given <code>Class</code> instance.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A><?></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../com/google/inject/TypeLiteral.html#get(java.lang.reflect.Type)">get</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</A> type)</CODE> |
| |
| <BR> |
| Gets type literal for the given <code>Type</code> instance.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A><?>></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../com/google/inject/TypeLiteral.html#getExceptionTypes(java.lang.reflect.Member)">getExceptionTypes</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Member.html?is-external=true" title="class or interface in java.lang.reflect">Member</A> methodOrConstructor)</CODE> |
| |
| <BR> |
| Returns the resolved generic exception types thrown by <code>constructor</code>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A><?></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../com/google/inject/TypeLiteral.html#getFieldType(java.lang.reflect.Field)">getFieldType</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</A> field)</CODE> |
| |
| <BR> |
| Returns the resolved generic type of <code>field</code>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A><?>></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../com/google/inject/TypeLiteral.html#getParameterTypes(java.lang.reflect.Member)">getParameterTypes</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Member.html?is-external=true" title="class or interface in java.lang.reflect">Member</A> methodOrConstructor)</CODE> |
| |
| <BR> |
| Returns the resolved generic parameter types of <code>methodOrConstructor</code>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A><? super <A HREF="../../../com/google/inject/TypeLiteral.html" title="type parameter in TypeLiteral">T</A>></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../com/google/inject/TypeLiteral.html#getRawType()">getRawType</A></B>()</CODE> |
| |
| <BR> |
| Returns the raw (non-generic) type for this type.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A><?></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../com/google/inject/TypeLiteral.html#getReturnType(java.lang.reflect.Method)">getReturnType</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</A> method)</CODE> |
| |
| <BR> |
| Returns the resolved generic return type of <code>method</code>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A><?></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../com/google/inject/TypeLiteral.html#getSupertype(java.lang.Class)">getSupertype</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A><?> supertype)</CODE> |
| |
| <BR> |
| Returns the generic form of <code>supertype</code>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../com/google/inject/TypeLiteral.html#getType()">getType</A></B>()</CODE> |
| |
| <BR> |
| Gets underlying <code>Type</code> instance.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> int</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../com/google/inject/TypeLiteral.html#hashCode()">hashCode</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../com/google/inject/TypeLiteral.html#toString()">toString</A></B>()</CODE> |
| |
| <BR> |
| </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.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></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="TypeLiteral()"><!-- --></A><H3> |
| TypeLiteral</H3> |
| <PRE> |
| protected <B>TypeLiteral</B>()</PRE> |
| <DL> |
| <DD>Constructs a new type literal. Derives represented class from type |
| parameter. |
| |
| <p>Clients create an empty anonymous subclass. Doing so embeds the type |
| parameter in the anonymous class's type hierarchy so we can reconstitute it |
| at runtime despite erasure. |
| <P> |
| </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="getRawType()"><!-- --></A><H3> |
| getRawType</H3> |
| <PRE> |
| public final <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A><? super <A HREF="../../../com/google/inject/TypeLiteral.html" title="type parameter in TypeLiteral">T</A>> <B>getRawType</B>()</PRE> |
| <DL> |
| <DD>Returns the raw (non-generic) type for this type. |
| <P> |
| <DD><DL> |
| <DT><B>Since:</B></DT> |
| <DD>2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getType()"><!-- --></A><H3> |
| getType</H3> |
| <PRE> |
| public final <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</A> <B>getType</B>()</PRE> |
| <DL> |
| <DD>Gets underlying <code>Type</code> instance. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="hashCode()"><!-- --></A><H3> |
| hashCode</H3> |
| <PRE> |
| public final int <B>hashCode</B>()</PRE> |
| <DL> |
| <DD><DL> |
| <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="equals(java.lang.Object)"><!-- --></A><H3> |
| equals</H3> |
| <PRE> |
| public final boolean <B>equals</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> o)</PRE> |
| <DL> |
| <DD><DL> |
| <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="toString()"><!-- --></A><H3> |
| toString</H3> |
| <PRE> |
| public final <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE> |
| <DL> |
| <DD><DL> |
| <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="get(java.lang.reflect.Type)"><!-- --></A><H3> |
| get</H3> |
| <PRE> |
| public static <A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A><?> <B>get</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Type.html?is-external=true" title="class or interface in java.lang.reflect">Type</A> type)</PRE> |
| <DL> |
| <DD>Gets type literal for the given <code>Type</code> instance. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="get(java.lang.Class)"><!-- --></A><H3> |
| get</H3> |
| <PRE> |
| public static <T> <A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A><T> <B>get</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A><T> type)</PRE> |
| <DL> |
| <DD>Gets type literal for the given <code>Class</code> instance. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getSupertype(java.lang.Class)"><!-- --></A><H3> |
| getSupertype</H3> |
| <PRE> |
| public <A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A><?> <B>getSupertype</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A><?> supertype)</PRE> |
| <DL> |
| <DD>Returns the generic form of <code>supertype</code>. For example, if this is <code>ArrayList<String></code>, this returns <code>Iterable<String></code> given the input <code>Iterable.class</code>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>supertype</CODE> - a superclass of, or interface implemented by, this.<DT><B>Since:</B></DT> |
| <DD>2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getFieldType(java.lang.reflect.Field)"><!-- --></A><H3> |
| getFieldType</H3> |
| <PRE> |
| public <A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A><?> <B>getFieldType</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Field.html?is-external=true" title="class or interface in java.lang.reflect">Field</A> field)</PRE> |
| <DL> |
| <DD>Returns the resolved generic type of <code>field</code>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>field</CODE> - a field defined by this or any superclass.<DT><B>Since:</B></DT> |
| <DD>2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getParameterTypes(java.lang.reflect.Member)"><!-- --></A><H3> |
| getParameterTypes</H3> |
| <PRE> |
| public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A><?>> <B>getParameterTypes</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Member.html?is-external=true" title="class or interface in java.lang.reflect">Member</A> methodOrConstructor)</PRE> |
| <DL> |
| <DD>Returns the resolved generic parameter types of <code>methodOrConstructor</code>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>methodOrConstructor</CODE> - a method or constructor defined by this or any supertype.<DT><B>Since:</B></DT> |
| <DD>2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getExceptionTypes(java.lang.reflect.Member)"><!-- --></A><H3> |
| getExceptionTypes</H3> |
| <PRE> |
| public <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A><?>> <B>getExceptionTypes</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Member.html?is-external=true" title="class or interface in java.lang.reflect">Member</A> methodOrConstructor)</PRE> |
| <DL> |
| <DD>Returns the resolved generic exception types thrown by <code>constructor</code>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>methodOrConstructor</CODE> - a method or constructor defined by this or any supertype.<DT><B>Since:</B></DT> |
| <DD>2.0</DD> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getReturnType(java.lang.reflect.Method)"><!-- --></A><H3> |
| getReturnType</H3> |
| <PRE> |
| public <A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A><?> <B>getReturnType</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Method.html?is-external=true" title="class or interface in java.lang.reflect">Method</A> method)</PRE> |
| <DL> |
| <DD>Returns the resolved generic return type of <code>method</code>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>method</CODE> - a method defined by this or any supertype.<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> </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/inject/Stage.html" title="enum in com.google.inject"><B>PREV CLASS</B></A> |
| NEXT CLASS</FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../index.html?com/google/inject/TypeLiteral.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="TypeLiteral.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> |